PBS VM CIFS Share?

AnThRaX

New Member
Jun 27, 2022
9
0
1
I have Proxmox installed and running, I'm looking to use PBS for automated backups, I have a CIFS share already in Proxmox itself that I have been manually doing backups to, it's a 2 disk mirrored share, is it possible to use this share as the backup location for PBS? If so, can anyone point me in the direction of doing so? I can't seem to figure it out, I've watched numerous videos, however the videos I've found, were all making a new shared with drives attached to the PBS VM and set to be mirrored that way. I'm wanting to use an already made mirrored share that's on my PVE host. Possible?

I MAY have gotten it... I added the mount in fstab, I am currently creating the datastore, hopefully this works as intended.
 
Last edited:
Wasn't as lucky as I had thought... Tried to run a backup and got
"ERROR: Backup of VM 2001 failed - command 'rsync --stats -h -X -A --numeric-ids -aH --delete --no-whole-file --sparse --one-file-system --relative '--exclude=/tmp/?*' '--exclude=/var/tmp/?*' '--exclude=/var/run/?*.pid' /proc/1836480/root//./ /var/tmp/vzdumptmp3118934_2001' failed: exit code 23"

No clue what I'm doing! LOL
 
If you only use this mirror for backups it would make more sense to just passthrough the disks and create a mirror inside the PBS VM. Keep in mind that its recommended to use local SSD for PBS. If you use HDDs your storage is already too slow for good PBS operation. Using SMB then will add more latency and overhead.

If you still want to use SMB you should first install the cifs-utils package and then create a fstab entry in your PBS VM to mount that SMB share on boot. You can then create a datastore pointing to the mountpoint of the SMB share. And make sure you mount the SMB share with the UID and GID of the backup user.
 
If you only use this mirror for backups it would make more sense to just passthrough the disks and create a mirror inside the PBS VM. Keep in mind that its recommended to use local SSD for PBS. If you use HDDs your storage is already too slow for good PBS operation. Using SMB then will add more latency and overhead.

If you still want to use SMB you should first install the cifs-utils package and then create a fstab entry in your PBS VM to mount that SMB share on boot. You can then create a datastore pointing to the mountpoint of the SMB share. And make sure you mount the SMB share with the UID and GID of the backup user.
It's not only used for backups, it's also home to data I'd rather not lose. I did end up getting the fstab method to work, ran a backup on one of my LXC's, but it fails if I don't use the Stop method. Not positive on what the best method to use is. I'm guessing I'm gonna have to have it set to Stop, as Suspend also fails with the same error I posted above.

"ERROR: Backup of VM 2001 failed - command 'rsync --stats -h -X -A --numeric-ids -aH --delete --no-whole-file --sparse --one-file-system --relative '--exclude=/tmp/?*' '--exclude=/var/tmp/?*' '--exclude=/var/run/?*.pid' /proc/3197238/root//./ /var/tmp/vzdumptmp3209054_2001' failed: exit code 23"

The entry I have in my fstab is:
"//192.168.50.209/data /mnt/data cifs noperm,iocharset=utf8,rw,credentials=/root/.storage_credentials,uid=root,gid=root,file_mode=0660,dir_mode=0770 0 0"

and I did place the .storage_credentials in the /root/ directory.
I'm extremely new to all of this Proxmox stuff.
 
Last edited:
Datastore should be owned by your PBS "backup" user, not the "root" user. And your LXC needs to be written to a temporary folder first before it can be backed up to the PBS when using snapshot or suspend mode. Maybe your root filesystem isn't big enough to temorarily store the whole LXC? If thats the case you could try to set another "tmpdir" in "/etc/vzdump.conf".
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!