Include/exclude files in proxmox-backup-client

stefano.cailotto

New Member
Dec 6, 2024
3
0
1
Hello,
I'm trying to switch my backup system (based mainly on backupninja and custom scripts) to proxmox-backup-client.
I wrote a small script to run backups, using the repeated --exclude flag not to backup unneeded data.
Comparing the size of previously backed-up data, I see a big discrepancy of backup size, so my question is: how are the --exclude flags treated, globally or per path/pxar file?
E.g. if I want to backup /etc and /root into 2 different archives, and I add the --exclude foo to the path, is it considered for both /etc/foo and /root/foo or only for the first path preceding it?

BR,
Stefano
 
Hi,
Comparing the size of previously backed-up data, I see a big discrepancy of backup size, so my question is: how are the --exclude flags treated, globally or per path/pxar file?
the exclude patterns apply to all the pxar archives you create with the command invocation. What discrepancy do you see?

E.g. if I want to backup /etc and /root into 2 different archives, and I add the --exclude foo to the path, is it considered for both /etc/foo and /root/foo or only for the first path preceding it?
Note that this will exclude any file/folder named foo, not just at the archive root. You might want to anchor the pattern, e.g. by /foo if you create your archive via proxmox-backup-client backup root.pxar:/root etc.pxar:/etc --exclude=/foo
 
Hi,

the exclude patterns apply to all the pxar archives you create with the command invocation. What discrepancy do you see?


Note that this will exclude any file/folder named foo, not just at the archive root. You might want to anchor the pattern, e.g. by /foo if you create your archive via proxmox-backup-client backup root.pxar:/root etc.pxar:/etc --exclude=/foo
The discrepancy I see is that the proxmox based backup (with the - hopefully - same include/exclude patterns ) is 3 times bigger than the backupninja based one.
It's clear that pattern exclusion, as I thought
 
You could dump the content for a snapshot via proxmox-backup-client catalog dump <snapshot> and compare that to the list of contents you expect, maybe that gives you a clue what else is included in the backup which you do not expect.