uccwiki

Traditionally, the UCC's backup system has left much to be desired, such as "existing" or "running on reliable hardware", let alone living up to the Rule of Three.

Backups at present run on Mollitz, which is housed in another location (off-site backups!). Contact <[email protected]> if you need to know where it is living.

Backups are run using rdiff-backup, a disk-based incremental backup system. These are managed by rdiff-manager, a Python wrapper written by DavidAdam.

Adding new machines

On the target system (the machine you want to back up):

On the backup server (mollitz):

Now wait until the nightly backup run. The output is:

Checking backup status

To list all the backups available for a particular host, or to see when it was last successful, on the backup server (Mollitz) run:

To list how much data is taken for each incremental backup (which is much slower), on the backup server (Mollitz) run:

Restoring a backup

To restore files from backup, on the backup server (Mollitz):

Restoring files locally

For example, using rdiff-backup -r  2022-02-22T02:00:03+08:00 /backups/merlo/etc /backups/tmp/merlo will restore the contents of merlo's /etc/ directory as of 22nd February to /backups/tmp/merlo.

Restoring files remotely

/!\ Be careful - this is easy to mess up, particularly if you are trying to restore to the original path. Note the double-colons in the restore path!

For example, rdiff-backup -r  2022-02-22T02:00:03+08:00 /backups/merlo/etc merlo::/restored/etc will restore the contents of merlo's /etc/ directory as of 22nd February to /restored/etc on Merlo.

Improvements to rdiff-manager

rdiff-manager is pretty simple but there is plenty of room for improvement. Check the TODO file in the distribution for ideas.


CategorySystemAdministration

Latest update on the backup system

[ROY] 20240930, 20241111

This section is about a temporary solution for rdiff-backup's version discrepancy issue which causes some machines can't be backup correctly.

molmol space dataset

It's a cronjob on molmol calling /root/zfs-send-script.sh everyday at 02:00, which take incremental snapshot on Space dataset first, then zfs send to dell-ph1 over ssh. Similar cronjob applies to dell-ph1->dell-ph2, 05:00 every Saturday.

Sample script could be found under wheel/docs.

good'ol rdiff-backup style backup

Also a cronjob, on dell-ph1, calling all .sh scripts under /etc/rsync-conf/ everyday 03:00; then take zfs snapshot (via /etc/rsync-conf/zfs-snapshot, on the whole dpool zfs pool) everyday 04:00 to create diffirential entries.

data retention

Snapshots older than 6mo will be destroyed on all 3 machines, by cronjobs.

TODO

PVE VMs

All machines are backup to wobbegong via PBS, scheduled every Saturday 00:00.

uccwiki: Backups (last edited 2024-11-18 20:01:44 by RoyXu)