Add TrueNAS share to PBS

How to Add a File Share to Proxmox Backup Server

For my local backups, I backup my virtual machines using Proxmox Backup Server to my TrueNAS device. While this is not the officially supported, it has worked well for me so far. The device I use for this is an Udoo x86 device which has worked perfectly for it. This way most of the heavy lifting is done by the TrueNAS. First install PBS on your device. I already have one set up as mentioned earlier, but I am going to install a new instance in a virtual machine for this - I may even use this one for offsite backups.

First we will set up a dataset to use for the backups on the TrueNAS:

  • Go to "Datasets" and select "Add Dataset". Name the dataset, in my case "PBS". I am placing it under my root dataset "Tank" and keeping the Preset Generic.
  • Go to Shares and select "Add" under "NFS Shares." Select the directory of the dataset you just created and put in the IP of the PBS under hosts. Select the "Advanced Options" and under "Maproot User" put in root and under "Maproot Group" put in wheel.
  • Now we need to prepare PBS for mounting the NFS share. Jump onto the Proxmox Backup Server and go into the Shell. Run the commands to create a mountpoint, give all permissions, and add to fstab to mount on boot:
  • mkdir /mnt/NFS-Share
  • chmod -R 777 /mnt/NFS-Share
  • echo '10.0.30.9:/mnt/Tank/PBS /mnt/NFS-Share nfs defaults 0 0' >> /etc/fstab
  • systemctl daemon-reload

Now we test if it will work with "mount -a". Run "df -h" to see if it sees the mount and has an accurate account of space.
Now that the NFS share is mounted in PBS, we can add it as a datastore to PBS. Go to "Add Datastore" and give it a name and put in the Backing Path, in our case /mnt/NFS-Share. The only other options I'm changing is I want to only keep the last 30 backups under Prune Options. Be patient while it sets the datastore up.

Now we will go to add the Proxmox Backup Server to Proxmox VE. Go to the URL for PBS and select "Show Fingerprint" and copy it. We'll need this for adding PBS to Proxmox. Go to your Proxmox VE and go to Datacenter > Storage > Add > Proxmox Backup Server. Paste in the fingerprint at the bottom and fill the rest of the info out.
Screenshot%202024-11-20%20152849%20%281%29

After hitting add you should be able to go into one of your VMs and go to the Backup menu. Make sure that the Storage is set to your PBS server and try backing up the VM.
Hit "Backup now" and let the wait for it to finish backing up. Since this is the first backup it may take a while. Once finished we can see the backup succeeded: Screenshot%202024-11-20%20153556%20%281%29 Now you can go into the PBS again, go into the datastore and change the Prune jobs to however many backups you want to keep. Since PBS does so well with saving space, I keep it at the last 30 backups since it takes almost no extra space.

Previous Post Next Post