Automated backups for lab machines
Huge progress today.
I have a virtual rsnapshot environment working that automatically backs up a remote machine once per day. here's how:
1) install rsnapshot from the repos
2) configure it by editing the conf file at /etc/rsnapshot.conf
* make sure to edit "snapshot_root"
* uncomment "cmd_cp"
* uncomment "cmd_ssh"
* edit intervals to something useful, like "interval daily 5" - commenting out intervals not being used. This setting takes 5 snapshots per week.
* set log file location
* enable lockfile (rsnapshot should run as root)
* set includes and excludes if needed - I set up an excludes file
* set backup points - one for each machine: e.g. "backup user@machinename/ip:/home/netlink/ machinename/"
3) Prime the pot by manually running a backup: sudo rsnapshot daily
4) Then, set a crontab for running things every weekday at 6pm:
crontab -e
0 18 * * 1,2,3,4,5 /usr/bin/rsnapshot daily
5) Wait until 6pm
I've yet to test this on a real server/machine, but I'll set up Titchy as an rsnapshot server to take the next step.
Also to do: adjust rollover so that stale snapshots don't just get deleted, the latest version is always archived somewhere. Is this rdiff?
NOTE: rsnapshot handles the above issue on its own.
NOTE: when rsnapshot runs from the collector end (i.e. pulling *from* a client) it invokes a process on the client end that shows up as "rsync --server --sender -logDtprRe.iLsf --numeric-ids . /home/gregster/Desktop" where "/home/gregster/Desktop" is the path to the stuff getting backed up. This will be useful when locking down legal processes using single-use ssh-keys.