Using CIFS/SMB with Proxmox Backup Server 3

  • By default, Proxmox Backup Server expects
    • Local storage
    • SSD storage
  • PBS can work with CIFS/SMB or NFS storage and HDDs, but restoring backups will be very slow.
    • By slow I mean around 40 minutes to restore a 60GB virtual machine.
    • But for some, like me, the storage savigs are worth the performance tradeoff
    • I would not recommend this in a corporate production environment, but it is perfectly fine for a homelab.
  • Unlike in PVE, there is no GUI way to mount a CIFS share
  • We will have to do it manually
  • Add the following to your /etc/fstab file
    //serverip/networkshare /media/localfolder cifs vers=3.0,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=34,gid=34
    • Let me guide you on how to put the proper parameters where
    1. First is IP slash Network share where you want to put the PBS datastore
    2. Second is the local folder on the PBS filesystem where it will be mounted
    3. Third is saying fstab we want to use SMB and it's version (in this case 3.0)
    4. Fourth is path to location of our credentials file
      • You can put username and password into fstab but it is not a good idea
      • The .smbcredentials file will contain username and password that can read and write to the network share we want to store in, ie
        //serverip/networkshare
      • Example content of the .smbcredentials file
        username=serviceuser
        password=o8nbarm4agsrip8kef
      • After creating the file and adding these two lines into it we need to protect it, so run
        chmod 400 ./smbcredentials
    5. Rest is what character set we will use, what chmod will created files and folders me (0777 isn't secure but it's simple and it works)
    6. Last, uid and gid is imporant. 34 is the user ID of the proxmox “backup” user, which has to appear to PBS as the owner of the /media/localfolder folder
    • Example of a full fstab entry
      //nas.laptopwiki.local/backups/pbs /media/nas cifs vers=3.0,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=34,gid=34
  • In PBS, in the left menu, click Add Datastore
  • Name is what will it be listed as and what we will need to use when we add it to Proxmox VE
  • Let's call it “datastore1”
  • Backing path is the full local path of the network share we set up in previous step, so “/media/nas”
  • Add the datastore
  • If you are on HDDs, this will take a while. Mine took about 2 hours on a pair of Seagate Exos 16TB drives in RAID 1
  • In PVE, go to
  1. Datacenter
  2. Storage
  3. Add
  4. Proxmox Backup Server
  • ID = what it will be called, let's call it “pbs1”
  • Server = IP/DNS name of your PBS server
  • Username = easiest is to use root@pam, that will add it as our root user we also use to log in into PBS
  • Password = password for our root user
  • Datastore = name of the datastore we created, in our case datastore1
  • Now go back into PBS and click on Dashboard
  • In the middle of the screen will be a Fingerprint button
  • Press that, copy the long string and paste it into our “Add Storage” dialog we have currently open in PVE.
  • Click Add
  • laptopwiki/guides/os/proxmox/pbs_cifs.txt
  • Last modified: 29/06/2024 15:17
  • by 127.0.0.1