Duplicity backup script for S3 fails on CentOS 5 -


hi have not been able setup backup s3 using guide: http://www.cenolan.com/2008/12/how-to-incremental-daily-backups-amazon-s3-duplicity/

i error when run script: command line error: expected 2 args, got 0 enter 'duplicity --help' screen.

the duplicity log file: 2013-08-07_17:43:20: ... backing filesystem ./duplicity-backup: line 60: --include=/home: no such file or directory

my script this:

!/bin/bash  # set variables logging logfile="/var/log/backup.log" dailylogfile="/var/log/backup.daily.log" host='hostname' date=`date +%y-%m-%d` mailaddr="user@domain.com"  # clear old daily log file cat /dev/null > ${dailylogfile}  # trace function logging, don't change trace () {         stamp=`date +%y-%m-%d_%h:%m:%s`         echo "$stamp: $*" >> ${dailylogfile} }  # export env variables don't have type export aws_access_key_id="xxxxx" export aws_secret_access_key="xxx" export passphrase="xx"  # gpg key gpg_key=xxxx  # how long keep backups older_than="1m"  # source of backup source=/  # destination # note bucket need not exist # need unique amongst # amazon s3 users. so, choose wisely. dest="s3+http://xxxx"  full= if [ $(date +%d) -eq 1 ];         full=full fi;  trace "backup local filesystem started"  trace "... removing old backups"  duplicity remove-older-than ${older_than} ${dest} >> ${dailylogfile} 2>&1  trace "... backing filesystem"  duplicity \     ${full} \     --encrypt-key=${gpg_key} \     --sign-key=${gpg_key} \     --volsize=250 \ #    --include=/vhosts \ #    --include=/etc \     --include=/home \     --include=/root \     --exclude=/** \     ${source} ${dest} >> ${dailylogfile} 2>&1  trace "backup local filesystem complete" trace "------------------------------------"  # send daily log file email cat "$dailylogfile" | mail -s "duplicity backup log $host - $date" $mailaddr  # append daily log file main log file cat "$dailylogfile" >> $logfile  # reset env variables. don't need them sitting around export aws_access_key_id= export aws_secret_access_key= export passphrase= 

does see wrong?

you should remove commented lines script execution. from:

duplicity \     ${full} \     --encrypt-key=${gpg_key} \     --sign-key=${gpg_key} \     --volsize=250 \ #    --include=/vhosts \ #    --include=/etc \     --include=/home \     --include=/root \     --exclude=/** \     ${source} ${dest} >> ${dailylogfile} 2>&1 

to

duplicity \     ${full} \     --encrypt-key=${gpg_key} \     --sign-key=${gpg_key} \     --volsize=250 \     --include=/home \     --include=/root \     --exclude=/** \     ${source} ${dest} >> ${dailylogfile} 2>&1 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -