Nextpertise a journal of interesting technical ideas . . .

Proxmox Backup Server

by Brent Stewart on Sunday, Feb 4, 2024

Proxmox Backup Server (PBS) saved my bacon.

Backstory

I’ve been using Proxmox VE (Virtual Edition) for a couple years and I’ve been pretty pleased with it (previous article on using it to run GNS3). I run a virtualization server at home for a few reasons. VMs have been a way to break apps out into seperate environments, making supporting self-hosting easier. I think containers have made inroads here and many folks prefer them, but - no judgement - I’ve always found VMs to be conceptually easier. Second, I’ve supported virtual environments and wanted to use my home network to get hands-on time.

Originally, I used a free version of VMWare (6.0 and later 6.5) but VMWare stopped supporting that version and it has never made sense to pay for an ESXi license for a home lab. Proxmox VE had a lot of the capabilities, plus the Linux underpinnings were much more obvious (which supported another direction I was heading). The PVE environment has been mostly good and I’ve never had an issue that I couldn’t recover from (similar to what you’d expect running ESXi). Recently, however, I had a hard-drive fail in the RAID array. That server was already pretty long in the tooth, so I built a new one.

note
Proxmox includes a container technology that is interesting, but different from what someone familiar with docker might intuitively expect. I’ll get into that in a seperate post. For purposes of this story, I’m using “vm” but as many of my workloads as possible run as LXC containers.

So what happened was . . .

All good to this point, new server came up running PVE without a hitch. I joined the servers together in a cluster and migrated VMs. Most of my VMs, as mentioned, are single purpose appliances (either downloaded or assembled). One of my VMs has a big disk file and is used to store my personal files. And that’s the one that wouldn’t boot.

Because it’s the biggest disk (by far), I migrated other workloads first. I also upgraded my home network to 2.5G to support the environment, so I took a little longer to handle this VM. My guess is that the VM suffered corruption, either running in a limping-RAID1 or during transfer.

But I had already . . .

I setup PBS about six months ago and it had been backing up my VMs every week. I did a recovery on a small VM way back, but hadn’t really touched it since. In this case, I was able to restore a copy of the impacted VM from a few days prior and recover all my files. PBS runs in the background and emails me each week to let me know that it’s good. Recovery of a 2TB disk image did take a couple hours, but it was simple to setup. If you use PVE, I think you have to use PBS.

PBS Setup

Setting up PBS is about as difficult as setting up PVE. If you did the one, the other will not be a problem. The documentation is good, but takes some time to read so here’s a quick walkthrough of the actions you’ll need to take.

  1. Download and install PBS on a new machine. I’m using an old NUC with a 5TB drive. Download the image and throw it on Ventoy! This is an easy and obvious setup, so I won’t walk you through clicking “next”.
    Danger!
    Don’t install PBS on PVE! If your Virtual enviroment fails, you don’t want it to take backups with it! If you don’t have a suitable old PC, consider a 1L PC based on the modern Celeron like adding an NVME drive to this Kikusenko.
  2. When the process is complete, you can administer PBS from https://BACKUPSERVER:8007. Login as root and the password you chose during setup.
  3. Setup a Datastore on PBS. “Add Datastore” is found under Datastore on the Proxmox menu. This will make a local path available for backup use.

PBS Datastore Setup

  1. Setup Pruning to keep the latest backups. This setup mostly comes down to the crossing point of your budget, paranoia, and available space. You can specify the number of backups to keep over various timeframes, such as days, weeks, months, and years. I backup weekly and want to keep a couple backups, but I also keep monthlys as well in case I realize later that I need a restore.

  2. Get the “fingerprint” using the big “show Fingerprint” button on the dashboard.

PVE Setup to use PBS

PBS setup in PVE

  1. Back in the PVE environment, go to the server view and select DataCenter > Storage.

  2. Click Add and choose Proxmox Backup Server from the drop-down menu.

  3. Give the backup server an ID and enter in it’s IP address. Use root@pam as the username, the password you set on PBS and then supply the datastore setup in Step 3 above. Here’s where you’ll need to paste in the fingerprint from PBS. This is also the place where you can fiddle with retention and encryption if needed.

Setup Backups

PBS Job setup

The simple way to backup a VM at this point is just to select a VM and choose “Backup”. No one remembers to do backups though, so the key is to have them happen automatically.

  1. Still under Datacenter, choose backup and Add.

  2. To backup all VMs from all PVE instances weekly, use the following settings:

Final Notes

The process of setting this up isn’t too confusing. I find the Proxmox interface takes a little time to develop an intuitive feel, but this made sense. At this point, weekly backups should start flowing in. PBS will deduplicate and make very efficient use of space, so even a 4TB backup drive has been fine for me.

Restoring specific files or VMs is a topic for a second article. Hope this is helpful!



References:
  

Recent articles related to these tags:
backup virtualization linux
Share this article:   
Tweet