PBS Client - include and exclude files and folders

Romainp

Active Member
Jan 23, 2018
19
3
43
53
Hi all! Hope you're doing all well :)


I have to admit that the PBS client is a really cool tool but so complicated to use sometimes... or maybe it's me that do not understand how it goes...

That's why I am requiring your help here.

So, let's say that I have some Vms and want to:

* Take in backup only a subset of folder (like /etc/ and /root)

* Do not take into the backup some huge files (like .iso files if there are some)

So, to acheive this, this is what I am doing:
* create an exclude file in / like this:

Code:
$ cat /.pxarexclude
*
!/etc
!/etc/**
!/root
!/root/**

because and want to backup only /etc and /root

* in /root, created this file
Code:
$ cat /root/.pxarexclude
**.iso

Because I do not want to backup any iso files in the /root folder

and then:

$ proxmox-backup-client backup root.pxar:/

And it seems to work the way I wanted which is cool.
But.. is it the right way to do this? Is there a way more simple to do that with a sigle exclude file?
Just wondering if you could give me some advices :)

Thanks for any constructive comments!
Take care!
 
Last edited:
I haven't seen much discussion of this sort of exclusion on the forum. Haven't looked into it myself.
I'll be watching for any responses here, might learn something.

It's my impression that PBS does such good dedupe that most admins are focusing on tuning the backup server, not the backup jobs.
Meaning ... backing up those ISOs might not be the burden you would assume.

PBS gets one single copy of those bits, and then never downloads them again.
Really. Its total, complete, dedupe-from-hell.
So, one copy of those ISOs in your PBS datastore probably something you can tolerate.

Run some numbers. See if all these contortions are even worth your time.

...

Oh, and it sounds like you read something about this already.
If you haven't completely digested this page, take another look.
I can see what you are saying about it getting complicated ...

https://pbs.proxmox.com/docs/backup-client.html#excluding-files-directories-from-a-backup

The same syntax can also be used directly in the cli with the --exclude parameter.
Multiple paths can be excluded like this
proxmox-backup-client backup archive-name.pxar:./linux --exclude=/usr --exclude=/rust
 
Last edited: