### bash check if file exists
if [ -f $file ];
### first backup the new stuff
then python s3cmd put -r $DATADIR/$CLIENT/domains/ s3://bucketname/”$CLIENT”_`date +%d%m%Y`/
rm -rf $BASEDIROBJECT$OBJECT
touch “$BASEDIR”/logs/”$CLIENT”_backup-transferred`date +_%d%m%Y`.txt
else echo “nothing to backup”
So, this is the modified backup script, where I have removed the delete part of the domain, I have created a logfile after ‘successful’ uploading the content, so that with this file you can delete finally the content on the server in another script.
script has not run in crontab yet and I have only adapted it for 1 domain yet. Comments are welcome.