Proxmox Backup-server on LXC with external NAS

rickyo

Active Member
Oct 21, 2015
25
17
43
Instructions:
Log in as root@pam in Proxmox.

Download Debian 10 (Buster) template

Install a minimal Container (2 GB RAM, 8 GB HD) and then choose the container/Options/Features and then enable NFS.

Do:
#apt-get update
#apt-get dist-upgrade

Install the repo key
#wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg

Add PBS debian package repo to /etc/apt/sources.list
deb http://ftp.debian.org/debian buster main contrib
deb http://ftp.debian.org/debian buster-updates main contrib

# THIS IS THE NEW ADDITION
# PBS pbs-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pbs buster pbs-no-subscription

# security updates
deb http://security.debian.org/debian-security buster/updates main contrib


Install the PBS-server software
apt-get update

apt-get install proxmox-backup-server


After a reboot all is installed and started, don't forget to set the IP-address you want to use
and mounting the NFS-share you want to use as the storage for backups.
Put the NFS-share into /etc/fstab to automatically mount it at reboot.
 
Last edited:
If I'd run Docker, yes, but as I run Proxmox standard on most of my systems this is a very easy and fast way of getting a workable
backup-system.

/Rickard
 
  • Like
Reactions: James Crook
If I'd run Docker, yes, but as I run Proxmox standard on most of my systems this is a very easy and fast way of getting a workable
backup-system.

/Rickard
Yeah I was thinking it could be useful on synology NAS since they don't support LXC .... At least not that I know
 
  • Like
Reactions: Etienne Charlier
Absolutely
Yeah I was thinking it could be useful on synology NAS since they don't support LXC .... At least not that I know
Absolutely, BUT, you can run the PBS LXC on you PVE-host/cluster and use the NFS mounted storage. So no need to run on the Synology as docker.
 
  • Like
Reactions: benoitc
Absolutely

Absolutely, BUT, you can run the PBS LXC on you PVE-host/cluster and use the NFS mounted storage. So no need to run on the Synology as docker.
NFS performance is really poor for PBS, better use iSCSI (attached directly to PVE host).
 
NFS performance is really poor for PBS, better use iSCSI (attached directly to PVE host).
NFS isn't the fastest way but with a low-end NAS (Netgear) as the other side in this case, and PBS saturating the 1Gbit/s network it is enough.
Going with a separate server for PBS with local storage and a minimum of 10Gbit/s network for your Proxmox cluster is always the better choice.

But that wasn't what this excercise was about, this was settings up PBS for the SOHO-market without a lot of investments. Using PBS instead of VZdump with just storage gives you a lot better performance and better usage of the storage than not using it.

It also helps us heavy users in helping Proxmox as more use-cases usually means faster development and debugging. :)

Just my 2 cents...

Rickard
 
NFS performance is really poor for PBS, better use iSCSI (attached directly to PVE host).
why directly attached ? I was wondering how would be the performance vs a balanced 2x10G link on the nas using iscsi with a dedicated switch or vlan for it
 
why directly attached ? I was wondering how would be the performance vs a balanced 2x10G link on the nas using iscsi with a dedicated switch or vlan for it
Directly attached iSCSI drive to proxmox machine, I think it will not work in container. Don't use bonding for iSCSI, use multipath instead, bonding can be used with NFS.
 
Directly attached iSCSI drive to proxmox machine, I think it will not work in container. Don't use bonding for iSCSI, use multipath instead, bonding can be used with NFS.
yes i was thinking to use multipath. however with a dedicated switch or vlan it gives the flexibility to use the nas for other usages . I guess it depends on the usage . also it would be cool if PBS allows some caching or buffer usin a dedicated disk before writing to a a remote location.

I can understand local storage is faster but for a long term backup solution it doesn't make sense. using SAS or when you're constraint in tetm of budget or physical space iSCSI would give more flexibility. I hope it will be supported soon by PBS.
 
Instructions:
Download Debian 10 (Buster) template
Install minimal Container (2 GB RAM, 8 GB HD)

#apt-get update
#apt-get dist-upgrade

Install the repo key
#wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg

Add PBS debian package repo to /etc/apt/sources.list
deb http://ftp.debian.org/debian buster main contrib
deb http://ftp.debian.org/debian buster-updates main contrib

# THIS IS THE NEW ADDITION
# PBS pbs-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pbs buster pbs-no-subscription

# security updates
deb http://security.debian.org/debian-security buster/updates main contrib


Install the PBS-server software
apt-get install proxmox-backup-server


After a reboot all is installed and started, don't forget to set the IP-address you want to use
and mounting the NFS-share you want to use as the storage for backups.
Put the NFS-share into /etc/fstab to automatically mount it at reboot.
Followed your guide but get an "mount.nfs: Operation not permitted" Error when trying to mount the nfs share. Any ideas how to fix this?
 
Followed your guide but get an "mount.nfs: Operation not permitted" Error when trying to mount the nfs share. Any ideas how to fix this?
Ahh, I forgot to mention that you need to enable NFS in the options of the container.

You have to log in as root@pam and then choose the container/Options/Features and then enable NFS.

/Rickard
 
Last edited:
  • Like
Reactions: blackout
Ahh, I forgot to mention that you need to enable NFS in the options of the container.

You have to log in as root@pam and then choose the container/Options/Features and then enable NFS.

/Rickard
Ahahahaha that exactly solved it!! Man i spend so much time with that problem... should just have googled it.

Thank you very much for your detailed advice!
 
Last edited:
Ahh, I forgot to mention that you need to enable NFS in the options of the container.

You have to log in as root@pam and then choose the container/Options/Features and then enable NFS.

/Rickard
Hi! I enabled in LXC the NFS option, but I have an error to add datastore. EPERM: Operation not permitted. I can in the nfs mount folder to create a directory witouth problems.
Any suggestion?

Thanks in advance.
 

Attachments

  • photo_2021-02-15_10-38-39.jpg
    photo_2021-02-15_10-38-39.jpg
    18.2 KB · Views: 65
Hi Azatot,

did you set no_root_sqaush on the NFS-server?

Best regards,
Rickard
 
Hi Azatot,

the only real setting you need on any NFS-server including FreeNAS/TrueNAS is:

root/wheel permissions on the dataset and no_root_sqaush in the NFS share settings.

Best regards,

Rickard
 

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!