# Exclude other filesystems from the backup. This leaves only the files we
# want, on the root file system, to back up.
# Also exclude other large collections of files which we don't care to save.
# Exclude other filesystems from the backup. This leaves only the files we
# want, on the root file system, to back up.
# Also exclude other large collections of files which we don't care to save.
-touch /.backup_running
-
-ionice -c3 nice -n5 \
- rdiff-backup \
- --exclude-other-filesystems \
- --exclude-sockets \
- --exclude '/backup' \
- --exclude '/tmp' \
- --exclude '/var/cache/apt/archives' \
- --exclude '/var/log' \
- / /backup/
-# Remove old backups
-sleep 3600
-ionice -c3 nice -n5 rdiff-backup -v1 --remove-older-than 60D /backup/
-
-rm -f /.backup_running
+# Remove old backups to free up some space
+rdiff-backup -v1 --force --remove-older-than 365D /backup/
+
+) 200>/var/run/backup