Computers/Backups
From Giles
Jump to navigationJump to search
General
Backup are automatic and managed through ansible. Data is backed up to the physical-server kereru, backups are stored in the /home/borg directory, which is mounted onto the external disk.
Working with backups
# Setup HOST=$(hostname) REMOTEHOST="kereru.giles.net.nz"
Inspecting backups
# List all archives in the repository sudo -u borg borg list "ssh://borg@$REMOTEHOST/home/borg/backups/$HOST"
# Choose an archive, look inside it sudo -u borg borg list "ssh://borg@$REMOTEHOST/home/borg/backups/$HOST::whio-2022-04-24T00:30:25"
Restoring data
# To restore a single file sudo -u borg borg extract --stdout "ssh://borg@$REMOTEHOST/home/borg/backups/$HOST::whio-2022-04-24T00:30:25" /pathtorestore > /tmp/outputfile
# To restore a everything to how it was previously sudo -u borg borg extract "ssh://borg@$REMOTEHOST/home/borg/backups/$HOST::whio-2022-04-24T00:30:25"