Proxmox Backup Server - Mounting an SMB NAS Share as a PBS Datastore#
This note outlines the step-by-step process used to mount a remote SMB/Samba share from a NAS onto a Proxmox Backup Server (PBS) host at the OS level, assign proper permissions for the PBS daemon, and initialize it as a new backup datastore.
Prerequisites#
- A target share on the NAS (e.g.,
//10.1.2.2/ProxmoxBackups). - An existing SMB credentials file on the PBS host (e.g.,
/root/.smb_credentials).
Step-by-Step Implementation#
Step 1: Create the Local Mount Directory#
Create a dedicated folder at the root of the PBS host filesystem where the network share will be attached.
mkdir -p /Backups-PriorityStep 2: Install SMB Client Tools#
Ensure the system has the necessary utilities to handle CIFS/SMB mounts.
apt update && apt install cifs-utils -yStep 3: Configure Persistent Mount via fstab#
To ensure the NAS share automatically mounts on boot with the exact permissions required by PBS, append the mounting parameters to /etc/fstab.
- Open the file:
nano /etc/fstab - Add the following line at the very bottom:
//10.1.2.2/ProxmoxBackups /Backups-Priority cifs credentials=/root/.smb_credentials,uid=34,gid=34,iocharset=utf8,vers=3.0,nofail,_netdev 0 0
uid=34,gid=34forces the mount file ownership to the PBSbackupsystem user. Without this explicit mapping, PBS will hit aPermission Deniederror when trying to write to the NAS.
Step 4: Mount and Verify Permissions#
Reload the systemd daemon to process the updated fstab configuration and mount the share.
systemctl daemon-reload
mount -aVerify that the mount is active and owned by the backup user:
ls -la / | grep Backups-PriorityExpected Output:
drwxr-xr-x 2 backup backup 0 Jul 13 16:48 Backups-Priority
Step 5: Initialize the Datastore in PBS GUI#
Once the OS sees the path with proper permissions, the datastore can be initialized via the PBS web portal.
- Navigate to the PBS Web UI (
https://<PBS-IP>:8007). - Go to Datastore -> Add Datastore.
- Configure the following fields:
- Name:
Backups-Priority - Backing Path:
/Backups-Priority
- Name:
- Click Add.
Note: Because this is a network mount, initializing the 65,536 required chunk subdirectories (0000 to ffff) will take roughly 10 minutes to reach 100%.