]>
code.delx.au - monosys/blob - scripts/backup-generic
1ad6055c7e17907428b79b2e0c290a3a4208ac2f
3 # Run this at a lower priority to avoid disrupting the rest of the system
5 renice
-n 19 -p $$
> /dev
/null
8 # Only allow one backup to run at a time
9 if ! flock
-n -x 200; then
10 echo "Failed to get a lock!"
14 # Exclude other filesystems from the backup. This leaves only the files we
15 # want, on the root file system, to back up.
16 # Also exclude other large collections of files which we don't care to save.
18 --preserve-numerical-ids \
20 --exclude '/home/*/tmp' \
24 --exclude '/var/cache' \
25 --exclude '/var/log' \
27 --exclude-other-filesystems \
31 # Remove old backups to free up some space
32 rdiff-backup
-v1 --force --remove-older-than 365D
/backup
/