Computers/Backups

From Giles
< Computers
Revision as of 05:18, 21 May 2022 by 192.168.0.159 (talk) (Created page with "{{TOCright}} {{TOCright}} === General === Backup are automatic and managed through ansible. Data is backed up to the physical-server Computers/Kereru|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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"