Multiple directories excluded from LXC backup

bomart

Member
Feb 21, 2020
5
0
21
52
Hello!

I make excludes from my LXC backup:
pvesh set /cluster/backup/backup-ced960d3-6428 --exclude-path "/home /var/ /usr"
and i start backup manualy, log looks good:

INFO: starting new backup job: vzdump 111 --mode snapshot --notes-template '{{guestname}}' --storage noc3-proxmox --mailto tech@... --mailnotification failure --compress lzo --exclude-path '/home /var/ /usr' --all 0 --node px3

but all of excluded directories is in my backup :(

When I change to only one exclude:
pvesh set /cluster/backup/backup-ced960d3-6428 --exclude-path "/usr"
backup works well - is without usr.

How can i exclude few directories?
 
Hi,
you need to specify the argument multiple times, i.e. pvesh set /cluster/backup/backup-ced960d3-6428 --exclude-path /home --exclude-path /var/ --exclude-path /usr. Otherwise, you couldn't distinguish between paths with actual spaces in them and lists.
 
  • Like
Reactions: bomart
Hi,
you need to specify the argument multiple times, i.e. pvesh set /cluster/backup/backup-ced960d3-6428 --exclude-path /home --exclude-path /var/ --exclude-path /usr. Otherwise, you couldn't distinguish between paths with actual spaces in them and lists.
How to specify multiple folder exclude-path from a scheduled backup defined in Datacenter section for a specific LXC container?

Thanks
 
Hi,
How to specify multiple folder exclude-path from a scheduled backup defined in Datacenter section for a specific LXC container?
I don't think the setting is exposed in the UI. You can use cat /etc/pve/jobs.cfg to see what ID the backup job has and then use the pvesh command to modify the setting.

If you want to limit the setting to a single container, you need to create a separate job for it.

EDIT: If you use PBS, you can also use .pxarexclude instead: https://pbs.proxmox.com/docs/backup-client.html#excluding-files-directories-from-a-backup
 
Last edited:
  • Like
Reactions: Vittorio

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!