How to exclude mount point from vzdump backup

Sasha

Well-Known Member
Oct 18, 2018
88
1
48
Kazahstan
Hi, guys!

I'm really in stuck with manual https://pve.proxmox.com/pve-docs/vzdump.1.html
It says "By default additional mount points besides the Root Disk mount point are not included in backups."
But vzdump log says "excluding volume mount point mp0 ('/var/www/files.local') from backup (disabled)"
And in fact while restoring that backup we got a mount point restored.

Would You help me to figure out what command line option of vzdump will stop backing up mount point?

Appreciate for advices!
 
And the files inside files.local indeed get backuped? Or is there only the folder after the restore?
 
Files are ignored due to the option
vzdump 101 --exclude-path '/var/www/files**' --compress zstd --dumpdir /backups/backup_vm --mode snapshot
But my harm is restored mount point and its volume. I don't need that volume to be restored.

1627881408794.png
 
Ah, now I get the problem. Can you double click on that disk and uncheck the box „Backup“?
 
it's unchecked by default already
1627881981635.png
And as i said erlier backing up log contains strange info about disabled... excluding mount point... Where excluding is disabled and what for?
"excluding volume mount point mp0 ('/var/www/files.local') from backup (disabled)"
 
Last edited:
no, the volume is excluded BECAUSE backup is disabled (there are other reasons why a volume could be excluded from being backed-up as well ;)). it is still referenced in the config though, so upon restore a fresh empty volume will be created in its stead. if you want to prevent the latter you can override the -mp0 option when doing a manual restore via pct restore or the API, but the GUI doesn't offer this option.
 
  • Like
Reactions: Sasha
Yes, pct restore point would be suitable. But can You clarify how command line should appear?
/usr/sbin/pct restore 101 /opt/downloads/backup_new/vzdump-lxc-101-*.tar.zst -mp0
or
/usr/sbin/pct restore 101 /opt/downloads/backup_new/vzdump-lxc-101-*.tar.zst --mp0

or what?
 
actually, just adding --rootfs STORAGE:SIZE_IN_GB will override all the mountpoint configuration of the backup and just allocate a single volume for the rootfs (on the given storage, with the given size). if you want more complex combinations, you can pass in any valid --rootfs or --mpX settings (e.g., use the data and non-storage config from the backup, but with rootfs on one storage, and a new mountpoint mp0 on another with settings x, y and z).
 
  • Like
Reactions: Sasha
I do appreciate You for Your support. After reading Your advices I tried to read documentaion and solve a new task: restore mount point with a new size 1 Gib.

/usr/sbin/pct restore 101 /opt/downloads/backup_vm/vzdump-lxc-101-*.tar.zst --storage hgst-lvm --mp0 volume=STORAGE_ID:1

But pct didn't recognize that option. Am i globally stupid?

Code:
--mp[n] [volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]
Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.
 
Last edited:
for a mountpoint you also need to provide mandatory 'mp' property (where it is mounted inside the container).
 
  • Like
Reactions: Sasha
After
Code:
/usr/sbin/pct restore 101 /opt/downloads/backup_vm/vzdump-lxc-101-*.tar.zst --storage hgst-lvm --mp0 volume=hgst-lvm:vm-101-disk-1,mp=/var/www/files.local,replicate=0,size=1G

got
Code:
mount points configured, but 'rootfs' not set - aborting
etc etc etc

It doesn't work at all because of need of creation volumes groups etc for rootfs and mount point. Too ugly solution...

In the same time
/usr/sbin/pct restore 101 /opt/downloads/backup_vm/vzdump-lxc-101-*.tar.zst --memory 2048 --swap 2048 --storage hgst-lvm
creates volumes automatically

IT would be great just change mount point size while backing up as it's possible with memory and swap...
 
Last edited:
you don't need to create volume groups or anything else - just specify --rootfs STORAGE:SIZE (optionally combined with other options like acl) and if you want, additional mountpoints --mp0 STORAGE:SIZE,mp=/PATH/IN/CONTAINER (again optionally combined with other options like acl,ro,..).
 
  • Like
Reactions: Sasha
It seems to be working command line! Appreciate for Your patiency!
Would You advice, how i can restore owner of my mount point folfer? It become a root after restoring, but on premise it's www-data...
Should i run after restoring something like

pct exec 101 -- bash -c 'chown www-data.www-data /var/www/files.local'

?
 
Last edited:
yeah that should work (or pct enter to get a shell inside the container ;))
 
  • Like
Reactions: Sasha

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!