##################################################### # # # © 2000-2001 Fritz Mesedilla. # # Systems Administrator # # Summit Interactive, Inc. All rights reserved. # # Last Updated: 04 September 2001 # # # # This will backup a specified folder. # # This script is taken from the Data.fs script # # that I also made. # # # # Tested Versions: # # Zope 2.3.2 and ZEO 1.0b4 # # # ##################################################### #Declarations ######################################################### ZOPE_PATH="/usr/local/zope" JOBS_PATH="${ZOPE_PATH}/sysad" STAMP=`date +%b_%d_%Y` ZOPE_COMMAND="/usr/local/bin/python ${ZOPE_PATH}/lib/python/ZPublisher/Client.py" ZOPE_ADDRESS="http://www.foo.com:8080" if [ -z $1 ] then { echo "" echo "script: backup_zope.fcm" echo " by: mesedilla studios" echo "" echo "Usage: backup_zope.fcm folder_name" echo "" exit $NOARGS } else { #Declare Filename ######################################################### FILE_NAME="${1}" #Authentication Path ######################################################### . ${JOBS_PATH}/auth.conf #Export Folder ######################################################### ${ZOPE_COMMAND} -u ${ZOPE_AUTH} ${ZOPE_ADDRESS}/manage_exportObject id=${FILE_NAME} download:int=0 #Creating Backup File ######################################################### if [ -f "${ZOPE_PATH}/var/${FILE_NAME}.zexp" ] then { echo "" echo "File: ${FILE_NAME}.zexp exists." echo "Backing up file..." cp ${ZOPE_PATH}/var/${FILE_NAME}.zexp ${ZOPE_PATH}/var/${FILE_NAME}_${STAMP}.zexp echo "File: ${FILE_NAME}_${STAMP}.zexp created." echo "" } fi #Notify finished execution ######################################################### echo "" echo "Visiting file location..." echo "Issuing command... ..." echo "" ls -la ${ZOPE_PATH}/var/ echo "" } fi exit 0