CT: how to backup only root volume but...

zyghom

New Member
Mar 9, 2023
25
15
3
Hi,

I am setting up my first Proxmox and I came to small issue.
Details:
1- I have a CT that has small root partition on local-lvm (8GB)
2- mounted to this CT is alvo a big volume on local-lvm (1TB), where backups are happening from multiple sources i.e. Onedrive, IMAP (both are in the clouds)
3- I would like to have possibility to:
a- backup the CT to the usual place (outside Proxmox) - that works fine of course like all other CTs or VMs
b- the big volume NOT to be backed up (backup unchecked in the config and really it does not back up this volume)
c- in case I restore CT from backup to be able to ATTACH back the big volume from local-lvm to the restored container without loosing the data that was stored on it

I have failed miserably today: when I restored the CT, it got... fresh 1TB from local-lvm - apparently that is not what I wished for ;)

I am not sure if I am clear, or if that is possible but I count on someone who had similar thinking ;-)

Screenshot 2023-03-12 at 18.19.34.png

thanks
 
you can exclude a mountpoint from backups: double-click on `Mount Point (mp0)` in the web interface, this will give you a popup-menu. uncheck the `backup` box.

On restore, it should still correctly mount.

Hope this is what you are looking for and this helps :)
 
you can exclude a mountpoint from backups: double-click on `Mount Point (mp0)` in the web interface, this will give you a popup-menu. uncheck the `backup` box.

On restore, it should still correctly mount.

Hope this is what you are looking for and this helps :)
I thought so! but, when I restore, it assigns completely new fresh volume from local-lvm, with the same size and the same path
It simply deletes it when CT is deleted:

Screenshot 2023-03-13 at 14.03.57.png
 
Last edited:
Hi,
yes, restoring a container removes all current data of the container. There is a warning about this upon restore you need to confirm. In the future, there might be a more flexible dialog to keep certain volumes.
 
Last edited:
you can restore to a new VMID, and then re-assign the volume from the old to the new container (should be a simple rename on most storages, so rather cheap)
 
  • Like
Reactions: noel.
you can restore to a new VMID, and then re-assign the volume from the old to the new container (should be a simple rename on most storages, so rather cheap)
that is exactly what I found out finally:
1 - BEFORE deleting, remove the reference to the storage in /etc/pve/lxc/204.conf
Code:
mp0: local-lvm:vm-901-disk-1,mp=/mnt/disk,size=1000G,backup=0
2 - delete CT - it shall not delete this volume
3 - restore CT
4 - add the same line to the new config
that should be all, right? volume not backed up (as I wanted) yet not deleted when CT deleted/restored
 
it's a bit more risky than doing it via a new CT, e.g., accidentally checking the "purge" checkbox that removes unreferenced volumes as well on guest deletion would break your flow

1. restore backup into new CT
2. reassign owner of volume of old CT (CT -> Resources -> mpX -> Volume Action -> Reassign Owner)
3. start new CT, verify everything works
4. delete old CT

deletion comes last, so less chance of issues ;)
 

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!