diff --git a/roles/kde-backup/templates/backup-mason.sh b/roles/kde-backup/templates/backup-mason.sh index af5be9b..91dc627 100755 --- a/roles/kde-backup/templates/backup-mason.sh +++ b/roles/kde-backup/templates/backup-mason.sh @@ -1,18 +1,22 @@ LOCATION=/root/{{backup_directory}} # Cleanup old backups find $LOCATION -name '*gz' -mtime +6 | xargs rm -f # Capture home directories tar -cf $LOCATION/home.`date +%w`.tar -C / --exclude=home/git/deleted-repos --exclude=home/neon/deleted-repos home/ 2>&1 | grep -v "socket ignored" gzip -f $LOCATION/home.`date +%w`.tar +# Capture web applications +tar -cf $LOCATION/srv-www.`date +%w`.tar -C / srv/www/ 2>&1 +gzip -f $LOCATION/srv-www.`date +%w`.tar +# Backup configuration and list of installed packages tar -czf $LOCATION/etc.`date +%w`.tgz -C / etc/ tar -czf $LOCATION/crontabs.`date +%w`.tgz -C / var/spool/cron/ dpkg -l > $LOCATION/dpkg.`date +%w` chmod -R 700 $LOCATION cd $LOCATION/.. rsync --timeout=600 --delete -a backup {{gohma_backup_user}}@micrea.kde.org: