From 488bf506a4decb4e313c9d027cfcab23049474e7 Mon Sep 17 00:00:00 2001 From: Sven Hoexter Date: Sun, 9 Oct 2011 09:49:49 +0200 Subject: [PATCH] add a more aggressive cleanup for duplicity to avoid local and remote cache growth --- hetzner/hetznerbackupv2.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hetzner/hetznerbackupv2.sh b/hetzner/hetznerbackupv2.sh index cd0e830..2ceb473 100755 --- a/hetzner/hetznerbackupv2.sh +++ b/hetzner/hetznerbackupv2.sh @@ -27,19 +27,23 @@ job_main() { echo "Going for /etc" >> $SESSIONLOG duplicity $BMODE $dry /etc $PROTO://$FTP_USER@$FTP_HOST/main/etc >> $SESSIONLOG 2>&1 || ERRSTAT=1 duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/etc >> $SESSIONLOG 2>&1 || ERRSTAT=1 + duplicity cleanup --extra-clean --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/etc >> $SESSIONLOG 2>&1 || ERRSTAT=1 echo "Going for /home" >> $SESSIONLOG duplicity $BMODE $dry /home $PROTO://$FTP_USER@$FTP_HOST/main/home >> $SESSIONLOG 2>&1 || ERRSTAT=1 duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/home >> $SESSIONLOG 2>&1 || ERRSTAT=1 + duplicity cleanup --extra-clean --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/home >> $SESSIONLOG 2>&1 || ERRSTAT=1 echo "Going for /var/www" >> $SESSIONLOG duplicity $BMODE $dry /var/www $PROTO://$FTP_USER@$FTP_HOST/main/var/www >> $SESSIONLOG 2>&1 || ERRSTAT=1 duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/var/www >> $SESSIONLOG 2>&1 || ERRSTAT=1 + duplicity cleanup --extra-clean --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/var/www >> $SESSIONLOG 2>&1 || ERRSTAT=1 echo "Going for /var/lib/automysqlbackup" >> $SESSIONLOG if [ -e /var/lib/automysqlbackup/backupdone ]; then duplicity $BMODE $dry /var/lib/automysqlbackup $PROTO://$FTP_USER@$FTP_HOST/main/automysqlbackup >> $SESSIONLOG 2>&1 || ERRSTAT=1 duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/automysqlbackup >> $SESSIONLOG 2>&1 || ERRSTAT=1 + duplicity cleanup --extra-clean --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/automysqlbackup >> $SESSIONLOG 2>&1 || ERRSTAT=1 else echo "WARNING: It seems that the last mysql backup is still runing" >> $SESSIONLOG echo "Skipping mysql backup - please re-schedule" >> $SESSIONLOG -- 2.39.5