PowerEdge SC1425 #4 – Setting up Proxmox Backup Server

Hello again! I’m back with a new blog post about this rusty old server. This time, I want to install Promox Backup Server and integrate it to my main Proxmox host to backup all my LXC and VMs!

Proxmox Backup Server is an OS based on Proxmox VE to create backups of your Proxmox virtual machines or LXCs containers remotely on a dedicated server. It makes the process of backing up virtual machines very easy as it acts like a storage server but with a lot more features designed specifically for Proxmox.

So, let’s dive in…

Table of Contents

The Disks

In my previous blog posts about this server, I installed two 250GB hard drives to test the performances of this computer with different operating systems. However, I knew 500GB of storage wouldn’t cut it for a backup server as I need to have enough storage to store loads of backups. This is why I got two old 1TB SATA drive from work, as I thought it would give me plenty of storage to backup my LXC and VMs. I started by testing both drive in a computer I had laying around before plugging them into the server. So I plugged them both inside the computer. As you can see, they are sandwiched between some other drives here:

The two 1TB drives in a temporary server to test if they have any deflects. They are the drives with the barcode sticker on them.

And after booting the server, they got detected without any issue by the OS, as we can see with the output of the lsblk command below. We can see both drives with the sdb and sdc names. Those drives were used as part of old Windows 10 installs, so they still have the data on them. There is no sensitive data of any kind on them, and even if there were sensitive informations, I am about to erase them completely!

Output of lsblk and smartctl -l error -l selftest /dev/sdX to check status of the two drives.

smartctl, used to show SMART data of a storage device, doesn’t show any error or other issue, which is good! They are both at around 4000 hours of lifetime which is not that bad for old SATA drives. Now, I’ll erase all content from these drives with the dd command and writing a total of 2TB of zeros with this command:

dd if=/dev/zero of=/dev/sdX bs=8M status=progress

Note: Do NOT run this command on your computer if you don’t know what you are doing!!

This command will write zeros on the drive until it is full, making the disk completely empty. I will do this for the two drives I have in two differents SSH sessions and let them run for a while.

The status of the dd command in two SSH sessions.

While this was running, I opened the actual server and removed the disks I used in the previous blog post. I won’t be needing those disks for the moment, so, in the cubboard they go! I also used the time I had to create my bootable USB stick with Proxmox Backup Server on it. I just had to download the ISO and write it to my USB stick. I used GNOME Disks to write the ISO as it works really well for any kind of Linux ISOs.

The two empty disk bays in the server.

After 2 hours and zeros written later, data was erased without any error! These drives are good to be used!

Result of the dd command.

So, I proceded to install these drive back inside the server where they will probably sit forever, until they fail.

The two 1TB SATA drives installed in the server.

Installing Proxmox Backup Server

Okay, now, time to boot this thing and install Proxmox Backup ServerPBS for short – on it. I plugged my USB at the back, and after selecting the USB drive in the BIOS, it booted right up, and then I installed PBS normally. I opted to use ZSF in RAID 0 mode, as I only have two 1TB disks I prefer to have more storage rather than redundancy, plus, it is a backup server, so it is used as the redundancy of the other Proxmox VE server! PBS also detected my additional NIC that I put in the server in the previous blog post. Still sandwiched between the two gigabits interfaces!

PBS install setup screen showing all 3 networking interfaces in the server.

After I gave the interface an IP and a very secure root password – which was definitely not password – I let it install and after 15 minutes, the server rebooted! Although, it didn’t boot into PBS yet. This server has a tendency to disable the second SATA port in the BIOS when booting from USB, so it wasn’t able to boot without both drives detected. I turned it back on in the BIOS settings and it booted PBS without any issue.

Setup PBS

I got into my Proxmox Backup Server by going in the URL shown on the screen of the server from my main computer, and logged-in with the very secure password that I set previously, and I immediately got greeted by the “No Subscription” message… aahhh, classic Proxmox, we’ll remove that later, no worries.

It’s now time to configure this server!

Creating an user

The first step I did after logging in, was to create a new user in the Access Control menu so I don’t use the root account to create my backups from the remote server.

Menu to add an user inside PBS.

I also granted some permissions to my user in the Permissions tab so this user was able to manage backups of my containers.

Menu to grant permission to a user in PBS.

Creating Datastores

I proceeded by creating two Datastores, a Datastore is where the backup will be stored on the server. I’ll create one for my LXCs and another one for my VMs. I like keeping things separated so I’ll have one folder for each type of container.

Menu to add a Datastore inside PBS.

Linking PBS in Proxmox VE

After doing all of this, I was ready to link the storage from the PBS to the Proxmox VE server. I just went to the Datacenter menu in Proxmox VE, in the Storage submenu, then added a storage type of Proxmox Backup Server. I added both Datastores, by giving them different recognisable IDs. I needed to grab the Fingerprint of the PBS certificate, by going in the Certificates menu in PBS and by double clicking the proxy.pem certificate and copying the fingerprint shown on screen. After that, they both got added very quickly!

The menu to add a Proxmox Backup Server inside a Proxmox server.

Creating Backup Jobs

The final step was to add two backup jobs in my Proxmox server to backup my LXC and my VMs to the right Datastore. I went to the Datacenter menu and into the Backups submenu. I added two backup jobs, I gave them the right storage and scheduled them to be run every first saturday of each month. I will mostly only run these jobs manually, because the PBS server will be off most of the time. Each job got assigned either LXCs or VMs depending on the storage.

The creation of a backup job menu in Proxmox.

After creating them, I clicked Run Now on both jobs and they backed up everything in under 30 minutes, which is pretty cool!

Screenshot of the LXCBackup Datastore in PBS with all LXC backup created.

Removing annoyances in PBS

For my usecase, PBS has some annoyance turned on by default, let’s fix them!

PBS no-subscription repository

By default, PBS enable the enterprise version of their repository. Which, if you do not have an active subscription, will not give you any updates. To fix this, we can use the no-subscription repository in the Repositories tab inside the Administration menu – Keep in mind, that this repository is not as thoroughly tested as the enterprise version. Then, I simply disabled the enterprise repository by clicking it then clicking the disable button. After that we can add another repository using the Add button and selecting the No-Subscription repository.

Adding the no-subscription repository on PBS.

After that you should get updates for PBS directly from Proxmox.

Fake Subscription

All those messages saying that I do not have a subscription can get pretty annoying. Hopefully, I’m not the only one annoyed by this. And we can install the pve-fake-subscription package on PBS to get rid of all of these messages!

Just download the latest file from the GitHub release with wget, for exemple:

wget https://github.com/Jamesits/pve-fake-subscription/releases/download/v0.0.9/pve-fake-subscription_0.0.9+git-1_all.deb

Then we can install the package using the dpkg command :

dpkg -i pve-fake-subscription_0.0.9+git-1_all.deb

And here we go, PBS is Activated*.

* PBS is not really activated, this is just so those pesky messages do not show themselves anymore.

Dark Mode

You might also notice that the screenshots of my Proxmox VE server above, are in a dark theme. This is thanks to a pretty cool project called PVE-DiscordDark which add a dark theme to Proxmox VE. However, this doesn’t support PBS, so someone forked the project and made PBSDiscordDark!

To install this, just download the script using this command:

wget https://raw.githubusercontent.com/Luckyvb/PBSDiscordDark/master/PBSDiscordDark.sh 

And we can run the downloaded script using this command:

bash PBSDiscordDark.sh install

It is not as polished as the Proxmox VE theme, but it works and a Backup Server is not something you log into every day, so it works really well for what we want to do here – Also, friendly reminder to not run random script you find on the internet, and always review the content of said scripts before running them!

Default Shell

This is not really an annoyance, but more like a quality of life improvement. I like to use a shell other than bash in my servers, mostly because of the functionality that other shells can offer. On my Proxmox VE server, I have fish as the default shell. And I wanted to configure PBS the same way. To do so, I just installed the package:

apt update && apt install fish

And after it is installed, I can set it up as the default shell for the root user using this command:

chsh root -s /bin/fish

After changing the shell, I also changed the root password for something really secure now, using the passwd command.

Management Tools

Since this is a real server, it has an IPMI module onboard and to manage it you need to have the ipmitool command. I can manage it from my other servers or computers, but being able to manage it locally can be cool too! I just installed the ipmitool command with the following command:

apt install ipmitool

Once installed I can just run the ipmitool command directly on the server without specifying an IP or a user, pretty neet!

Press F1 to continue

With this server, I need to be able to turn it on, wait a few minutes, do my backups and turn it back off. The only problem is that I need to press F1 to continue the boot process everytime it starts-up. I never really cared, because I had a keyboard plugged in at all time while I was playing with it. But now, I need to be able to remove this limitation, so I don’t need to have a keyboard plugged in to turn it on. I did a bit of research and I found out that this happens when a device is enabled in the BIOS but is not used. So I went right into the BIOS and took a look at every devices enabled, and I had the IDE CD-drive thingy set to AUTO, so I turned it off and rebooted. And just like this, the message went away and the server booted normally without any interaction on my end!

Note: Ethernet ports at the back doesn’t need to be disabled when not in use!

Reverse Proxy

In my homelab, I use NGINX Proxy Manager to manage my reverse proxy. I use this so I can have local domains without ports! It’s pretty neet but I won’t be explaining how this works here, just know that I set it up so I can access my PBS with the URL pbs.domain.name! I also have a routine to generate manually self signed certificates, so I can access all of my services using HTTPS! I might do a blog post about all of this one day.

NGINX Proxy Manager screen to add a new proxy host.

After adding the website on my NPM, I also pointed the choosen domain name – i.e. pbs.domain.name – to my Proxy using my Pi-Hole DNS server. Again, I won’t be explaining how all of this works now. But I might do a futur blog post about setting up a reverse proxy and a DNS server like mine!

Dashboard Addition

In my homelab, I use the Homepage dashboard system to have a quick and easy way access all of my services, it also allows you to have some nice data shown! A few days before finishing writing this article, they released a new version, which includes a widget to retrieve some basic information of your PBS. I thought it would be good if I talked about it here as I really like this Homepage thing.

Screenshot of my Homepage dashboard.

To do so, you’ll need to create an user in your PBS server dedicated to this purpose, you can do this with the root user too, but I like to keep thing separated as I have stated before. To create an user, just go in the Access Control menu and then the User Management tab.

The “Add User” screen in PBS.

After adding an user, you’ll need to create an API token for this user, it will then give you an ID and a secret, that you will need to copy in your services.yml of your Homepage installation. It is done by going in the API Token tab and clicking Add API Token.

Creating an API toekn in PBS.

After creating an API token and copying the codes it will give you, you’ll need to go in the Permissions tab to grant your user some permissions, I gave it the Audit role, so this user doesn’t have full access to the server, only what’s required by Homepage. I also created an API token permission, with the same settings but with the API token created before.

Adding user permissions in PBS.

Then in my services.yml, in my Homepage config folder, I added this bit of config to add the newly created service.

    - Proxmox Backup Server:
          description: Hypervisor Backups
          icon: proxmox
          href: https://pbs.domain.name
             type: proxmoxbackupserver
             url: https://pbs.domain.name
             username: "ID"
             password: SECRET

And it worked really well! I mean, almost. There was a bug in the PBS widget with a wrongly set string that made the width of the widget enourmous when the server was down. I reported it to the team behind Homepage, and it got fixed in less than 30 minutes after I created the ticket! Kudos to them for being this reactive. Open-source software will always amaze me!

The PBS widget in Homepage, with all data retrieved.

Ending Note

I would say that setting up a Proxmox Backup Server was a breeze! It was fast and worked right out of the box without too much research or configurations! I was able to set it all up under an hour and it was really fun to do.

This will be the last blog post about this specific server as it is now used in my Lab as the backup server. I really hope I can get my hands on more hardware that I can blog about! I’ll maybe talk about softwares I use and how to use them, I’m not sure yet, I’ll think about what I want to write about next.

And as always, thank you for reading and if you have any feedback feel free to share it with me!

Leave a Reply

Your email address will not be published. Required fields are marked *