How to backup a mount point of the container

newtoproxmox

New Member
Jun 21, 2020
1
0
1
25
Hi,
I have an alpine container running postgres database, and I mounted a local LVM-thin to the /data/ directory to store the database data.
I got two questions here:
1. Is there a way I could preserve this mount point when I delete the container?
2. Is there a way I could backup this mount point?

Thanks.
 
1. Not via the GUI, but you can edit the file /etc/pve/lxc/<vmid>.conf and simply remove the line starting with "mpX" where X is your mountpoint number. Then, when the container is removed via the GUI, the mountpoint data should be left alone.
2. In the GUI you can simply edit your mointpoint and select "Backup", then it will be included in container backups. Backing up the mointpoint alone (without CT data) has to be done manually.