Map NFS Share in PBS
Firewall
Example rule in pfSense allowing PBS servers to reach ports (including NFS) on NAS servers
Ports:
- 111
- 892
- 2048
Configure Share Permissions
Create NFS Rule
Go to Control Panel > Shared Folder > Right-click folder > Edit
Go to NFS Permissions tab > Create
I'm going to use the FQDN of the server, since I have a DNS record for it
Mount Share in PBS
Configure Systemd Mount
We want the NFS share to mount at boot, so we'll add to /etc/fstab
nano /etc/fstab
synology-nas.nas.home.internal:/volume1/PBS_Backups /mnt/synology_backups nfs nfsvers=4.1,defaults,_netdev,x-systemd.automount,x-systemd.idle-timeout=60,soft,timeo=600,retrans=2 0 0
Mounts /volume1/PBS_Backups from the NAS to /mnt/synology_backups on PBS, using NFS protocol version 4.1
You can find your NFS share mount path by going to Control Panel > Shared Folder > Right-click Shared Folder > Edit > NFS Permissions
systemctl daemon-reload
mkdir -p /mnt/synology_backups
chown backup:backup /mnt/synology_backups
chmod 775 /mnt/synology_backups
mount -a
Mount successful, but must once again set correct ownership and permissions
chown backup:backup /mnt/synology_backups
chmod 775 /mnt/synology_backups
On the Synology side, this sets the mountpoint owner to UID:34 and GID:34, which is the UID and GID of the backup user on PBS
Configure Systemd Order
systemctl list-units --type=mount | grep 'synology_backups.mount'
Systemd manages the NFS mount with the mnt-synology_backups.mount
This is actually just the /mnt/synology_backups path with the leading / removed and nested / replaced with - (hyphen).
systemctl edit proxmox-backup.service
[Unit]
# Ensure the PBS API waits until the NFS share is fully mounted
After=mnt-synology_backups.mount
Requires=mnt-synology_backups.mount
systemctl daemon-reload
You may now reboot the PBS server to test the NFS auto-mount conditions systemctl reboot --now. Then, run mount | grep nfs to ensure the NFS share auto-mounted.







