[SOLVED] proxmox-backup-client --exclude question

RobFantini

Famous Member
May 24, 2012
2,042
109
133
Boston,Mass
Hello
i am trying to get -exclude to work. we do not want to put a .pxarexclude at each system
Code:
proxmox-backup-client  backup etc.pxar:/etc home.pxar:/home  --exclude home/*/.cache:home/*/.thunderbird/*/ImapMail

I've tried a few different ways over the last hour. each time i see:

Code:
warning: file size increased while reading: "rob/.cache/mozilla/firefox/ao09tv0u.default/cache2/entries/B1D563F6593E2B8F586E94EDE65064D9CCAD261F", file will be truncated!
warning: file size increased while reading: "rob/.cache/mozilla/firefox/ao09tv0u.default/cache2/entries/FE61B05C7F57DB27343C14638C94C1DFD2AAC934", file will be truncated!

I would like to do something like the following to exclude any cache folders/files:
Code:
 --exclude *.cache*:*Cache*:*ImapMail*

any suggestions ? thanks
 
Hi,
separating patterns with a colon doesn't works (it will be treated as part of the pattern). Use the following instead:
Code:
--exclude <pattern1> --exclude <pattern2>

Also note that if you do not start the pattern with a slash, it will match in any sub-directory, e.g. home/.cache will also match other/dir/home/.cache while /home/.cache will only match itself (both relative to the archive's root).
 
  • Like
Reactions: RobFantini
thank you Fabain.

this is what worked in our case:
Code:
proxmox-backup-client  backup etc.pxar:/etc home.pxar:/home  -exclude */.cache/  -exclude */Downloads/ -exclude */.thunderbird/*/ImapMail 2>&1
 
  • Like
Reactions: Shaaarnir