Proxmox

Creating and Restoring Backups in Proxmox

A virtual machine is quickly created and quickly broken, for example by a failed update or a broken disk. With backups you’re up and running again in minutes. Proxmox has them built-in and you don’t need to install anything extra.

Where do you put the backups?

Do not put backups on the same disk as the VMs: if that disk breaks, you lose everything. First add a different storage location:

  1. Go to Datacenter → Storage → Add.
  2. Choose the type: NFS or SMB/CIFS for a folder on your NAS, Directory for a second disk or USB disk, or Proxmox Backup Server (see below).
  3. Under Content, indicate that this storage is for VZDump backup file and save.

Setting up an automatic backup

  1. Go to Datacenter → Backup → Add.
  2. Storage: choose the storage for your backups.
  3. Schedule: for example every night at 02:00.
  4. Selection mode: All for all VMs and containers, or choose which ones yourself.
  5. Mode: Snapshot. The VM will then keep running during the backup.
  6. Compression: ZSTD is fast and small.
  7. Retention: determine how many backups you keep, for example the last 7 daily and 4 weekly.
  8. Click on Create.

Want to make one now? Select the VM, choose Backup → Backup now.

Restoring a backup

  1. Go to the storage where the backup is located and choose Backups.
  2. Select the backup and click on Restore.
  3. Choose where it should go. You can restore it over the existing VM, or under a new number (VM ID), so you can first check if everything is correct.

Test the restore once. A backup you don’t know works is not a backup.

Via the terminal

Useful for a quick backup. Replace 100 with your VM’s number and nas with the name of your storage:

vzdump 100 --storage nas --mode snapshot --compress zstd

Proxmox Backup Server

Proxmox Backup Server is a free addition from the same maker. It only saves what changed since last time, deduplicates data, and can encrypt and verify backups. You run it on a separate device (preferably not on the same machine) and connect it as storage.

The 3-2-1 rule

Keep three copies of what’s important, on two different types of storage, of which one is outside your home. A backup to a NAS in the same room doesn’t help with fire or burglary. For your photos and documents, a second copy elsewhere is worth the effort.

Note: the backup contains your virtual machines and containers, not the settings of the Proxmox server itself. Make a note of those (network, storage, passwords) or save a copy of /etc/pve.

Can't do it yourself? Have an expert come to your home via hulpaanhuis.nl