Network/Backup

From NURDspace

Host backups

On erratic, we have a 2 x 4TB raid1 array on which are passthrough to a VM running Proxmox Backup Server. All the backups of VMs are handled by Proxmox. Every day at 8am a backup job will run. To get your VM or lxc backed up, you do not have to do anything. It will be automatically included. If you do not want this to happen, you can exclude your VM/ lxc in datacenter > backup > edit backup job

Adding/removing hosts from backup

To add or remove a host from backup, modify the file /etc/backup.hosts. This file contains a comma-separated list of hosts to backup. The first column is the fqdn of the host which needs to be backed up. The second is the distro for this host. Right now, debian and openbsd are supported as hosts. Note that the host that is to be backed up needs to have a public key installed into the root account. This is included if you deploy the host as a ManagedVM.

Proxmox Backup Server (PBS)

For more information about this, visit the docs.

PBS can be reached from within the space network at https://backup.vm.nurd.space:8007

For some additional details see Network/Roadmap/RebuildBackupServer

Schedules

  • Every day at 8:00, Erratic will run the backup job for all the VMs and LXCs
  • Every day at 0:00, a prune job will run that removes old backups (daily 7, monthly 1, yearly 1)
  • Every month at 0:00, a verify job will run.

Remote Hosts

PBS supports remote hosts as well, and our remote hosts are configured to backed up to PBS (soon).

Ask a friendly BOFH to give you a username and password, as well as make a namespace. (ideally we set this up to use ldap instead)


Setting up on a Debian bookworm host

Installing proxmox backup client

sudo wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O 
/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
echo "deb http://download.proxmox.com/debian/pbs-client bookworm main" >> 
/etc/apt/sources.list.d/pbs-client.list
apt update
sudo apt install proxmox-backup-client

Making a backup

export PBS_REPOSITORY="<your username>@pbs@backup.vm.nurd.space:backup"
export PBS_FINGERPRINT="f4:f7:d8:01:13:5e:bd:0b:a6:b1:31:89:39:b6:4c:fa:03:69:82:17:cf:45:96:2c:bd:a9:08:bd:7f:ee:50:9d"
export PBS_PASSWORD="<your password>"
proxmox-backup-client backup <name>.pxar:/<path>--ns <your namespace>

Another example, taken from Proxmox

/proxmox-backup-client backup --crypt-mode=none root.pxar:/mnt/vzsnap0 --include-dev /mnt/vzsnap0/./ --skip-lost-and-found --exclude=/tmp/?* --exclude=/var/tmp/?* --exclude=/var/run/?*.pid --ns erratic

For more information see https://pbs.proxmox.com/docs/backup-client.html