this was such a pain in the butt to setup, but i finally got it work with nfs shares. the process was fairly simple with some command line work, but i am glad it is all done.
this was the process:
inside whatever nas software you are using, ensure that the nfs share is accessible to the pbs host ip address. i use truenas scale, so it was a matter of adding an authorized host ip address. from there, i changed the maroot user and group to the backup user, this is found in the advanced options when editing the nfs share. and then i added the backup user and group to the dataset that was associated to the nfs share, with read, write, execute permissions.
inside of pbs, the permissions can get scuffed as it is not really intended to use nfs shares as datastore locations. this is meant to be installed on bare-metal, with its dedicated drives. anyways, since i did not want to do that, i decided to virtualize it. when entering these commands, you can use different directory folders, but ensure which ones are being referenced or changed to your scenario. the main issue i had was that the guide i was following, it copied the .chunks and .lock files to /mnt/temp, which gave me permissions errors, so my changing it to /mnt/temp/ that fixed all my issues. just be patient during the copy process.
first we begin with creating two folders inside the /mnt directory. from there we change the permissions of the pbs-backups folder to the backup user and group. next, we edit the fstab file located in /etc. this is where we mount the nfs share from the nas server ip address, and we mount this to /mnt/temp. then we go ahead and mount this nfs share and reload the daemon. now we create the pbs datastore, which has the backing path set to the pbs-backups folder, not the temp folder. set your prune options as you see fit. when this is created, it will generate two files, .chunks and .lock. we want to copy these files to the temp folder. this may take a bit of time depending on the speeds of your drives, be patient. once moved over, you can edit your fstab file again and change the mount to the pbs-backups directory. mount the share and reload the daemon. now you can perform a reboot of the server to confirm that the mount is persistent.
mkdir -p /mnt/temp /mnt/pbs-backups
chown backup:backup /mnt/pbs-backups
nano /etc/fstab
nasipaddress:/nfs/location /mnt/temp nfs defaults 0 0
mount -a
systemctl daemon-reload
pbs – create the datastore that is pointed to /mnt/temp
cp -R /mnt/pbs-backups/.chunks /mnt/pbs-backups/.lock /mnt/temp/
nano /etc/fstab
nasipaddress:/mnt/nfs/location /mnt/pbs-backups nfs defaults 0 0
mount -a
systemctl daemon-reload
reboot
to add this pbs to proxmox ve, you go to datacenter, storage, and add pbs. the id can be named anything, server is the pbs ip address, username will be root@pam, password is your pbs root password. the datastore will be the exact name of the pbs datastore. the fingerprint is found on the pbs dashboard.
pbs storage is added, but it has to be on a backup schedule for efficient server management. the tab below storage, backup, this is where you can create a backup schedule for your virtualized machines. set the storage to pbs and set a desired schedule, i usually do daily during the night. then i like to do the selection mode to exclude selected vms since it allows for better management of what needs to be backed up. this is useful if you backup virtual machines on the same node you installed pbs on. for my instance pbs is on the second node and all of my services run off of the first node, though i plan to migrate services to the second node. then select your notification mode, which i set to the notification system which is mail for my setup. i do snapshot backups and then ensure the backup schedule is enabled. to get a good baseline, run the backup now so that pbs has a base backup to go off of.
now from here we can add a setting that will verify our backups to ensure that they are restorable. go to the datastore, go to verify jobs tab and press add. you can run this whenever you want, but this is a good automatic feature to enable so that it ensures your backups are reliable.
i will create a different post for setting up mail inside of proxmox ve. it is fairly simple.