Zuerst muss ein das Zielverzeichnis erstellt und freigegeben werden. In meinem Fall handelt es sich dabei um ein SMB-Share auf meinem QNAP-NAS für das ein separater Benutzer extra für die Backupzwecke angelegt wurde
Danach muss ein Verzeichnis-Mount mittels SMB-Protokoll innerhalb des Proxmox Backupservers (PBS) erstellt werden.
First, you’ll need to install CIFS utilities on PBS: (already available in latest versions)
apt install cifs-utils
Create a folder that you will mount the remote SMB share into:
mkdir /mnt/qnap2-pbs-datastore
Create a credentials file to store the credentials to access the remote machine:
nano /etc/samba/.smbcreds
… and set the username and password:
username=pbs-backup
password=pbs-backup_password
Save your file and make it readable by root only:
chmod 400 /etc/samba/.smbcreds
Finally, mount your SMB share in PBS:
mount -t cifs -o rw,vers=3.0,credentials=/etc/samba/.smbcreds //192.168.60.252/Backup/Proxmox-Backup-Server /mnt/
qnap2-pbs-datastore
Try to access the folder, and if it works attempt to write to it. If it works, make it auto-mount at boot by adding the following to /etc/fstab:
nano /etc/fstab
add the line:
//192.168.60.252/Backup/Proxmox-Backup-Server /mnt/
cifs credentials=/etc/samba/.smbcreds,uid=34,gid=34,defaults 0 0qnap2-pbs-datastore
Save the file. If for some reason something listed in /etc/fstab does not mount on reboot or if you made a change to it and need to test it, you can issue a
mount -a
to remount all shares.
Note: you may or may not need the
vers=3.0
option when mounting.I didn’t need it, so if it doesn’t work with try again without it. Also, theuid=34,gid=34
means that you are mounting this share as the backup user in PBS; as stated earlier in this thread that is a necessary to allowing PBS read/write access to the mount.The final step is adding your SMB share as a datastore in PBS. For that you simply use the GUI to Add Datastore and set the backup path to
Quelle: https://forum.proxmox.com/threads/pbs-mounting-windows-smb-share-as-datastore.113164/#post-498887/mnt/qnap2-pbs-datastore
and it should mount.
Anschließend kann dann das gemountete Verzeichnis im PBS als Backup-Datastore hinzugefügt werden. Dabei erstellt der PBS die benötigten Verzeichnisse/Daten, dies hat bei mir einige Zeit gedauert.


