Automated backups to external disk
I remember somebody asking how to do this on the CLUG lists a while back. But here's the problem:
You've got an automated backup system, but you want offsite backups. DVDs are too small, external hard drives are the only option. You want the user to be able to plug in the firewire disk, have the backup start automatically, and let them know when it's done.
Here's how I implemented it:
The backups are implemented with backup-manager, they backup into /mnt/backup-tmp/
The external hard drive connects by firewire. Running udevinfo -a -p /sys/block/sdd
on it showed me it's ID:
ATTRS{ieee1394_id}=="0090a9787b339de6:1:0"
I created this UDEV rule file /etc/udev/rules.d/local-backup.rules
:
ATTRS{ieee1394_id}=="0090a9787b339de6:1:0", SYMLINK="backupdisk", RUN+="/usr/local/sbin/backup-to-external.sh"
And the relevant fstab entry:
/dev/backupdisk /mnt/backup-disk vfat sync 0 0
And the backup script /usr/local/sbin/backup-to-external.sh
: