Multiple directories excluded from LXC backup

bomart

Active Member
Feb 21, 2020
7
0
41
53
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