[rear-users] Confusion over EXCLUDE_BACKUP vs. BACKUP_PROG_EXCLUDE

Johannes Meixner jsmeix at suse.de
Fri Jul 29 10:33:35 CEST 2016


the exact details depend on what exactly you use,
therefore here mainly some general information:

On Jul 28 11:45 David Yang wrote:
> I should mention I'm using rsync.  Not sure if that affects which variable
> is used for exlusions?  rear dump doesn't show EXCLUDE_BACKUP or
> EXCLUDE_COMPONENTS.  Does that mean they are ignored for rsync backups?
> On Wed, Jul 27, 2016 at 11:54 AM, David Yang <randomfire at gmail.com> wrote:
>> Can someone help me understand the differences between EXCLUDE_BACKUP, and
>> BACKUP_PROG_EXCLUDE and also when I need to use wildcard * to exclude a
>> whole directory?  I have been struggling to tame rear into backing up only
>> items that I've asked, but there's always one machine that misbehaves.
>> Also, for a NFS automounted directories, do I treat it as if it's a real
>> filesystem and use EXCLUDE_COMPONENTS to exclude it?  Or would I use some
>> other variable?

In general rear config variables are described
in usr/share/rear/conf/default.conf
and some more details can be found in the doc directory
e.g. in doc/user-guide/06-layout-configuration.adoc

In general rear config variables regarding the backup
depend on what is implemented in rear for each particular
backup method.

In general the backup and restore of the files is external
functionality for rear, see the section
"Relax-and-Recover (rear) versus backup and restore" in

For example when the TSM backup method is used one cannot
specify in rear what TSM should backup and restore, see

In contrast when a so called "internal" backup method
is used like tar or rsync one can for example specify
what to exclude from the backup acccording to how I
understand the code in

See usr/share/rear/conf/default.conf
# internal BACKUP stuff
# These settings apply to all cases of
# internal Relax-and-Recover backup
# BACKUP Program defaults. mostly tested with tar and rsync
# by default all local filesystems will be saved
# for a full understanding of these options, look at
# backup/NETFS/default/*.sh
I.e. you need to read the code to get a full understanding
of these options.

Furthermore you need to know how to correctly specify
for your particular backup program what to exclude.
This could be different syntax depending on the particular
backup program, e.g. in backup/NETFS/default/50_make_backup.sh
   tar ... -X $TMP_DIR/backup-exclude.txt
   rsync ... --exclude-from=$TMP_DIR/backup-exclude.txt
may need different kind of syntax for the entries
in the backup-exclude.txt file - i.e. you have to read
the documentation for your particular backup program.
E.g. for tar see
or better see the tar documentation that maches exactly
your particular installed tar program version.
in the rsync man page for your particular installed
rsync program on your particular system.
Furthermore it depends on the rear version what kind
of pattern matching is used by default, cf.

Have in mind that the backup and restore of the files
is external functionality for rear - i.e. do not expect
too much built-in magic intelligence in rear here.

In general when things do not work as expected see
"Debugging issues with Relax-and-Recover (rear)" in

In general to get a better understanding how rear works
you need to play around with it and do some trial and error
on your particular systems to get it working for you
as you need it in your particular environment.
In particular have a look at the sections
"First steps with Relax-and-Recover (rear)" and
"How to adapt and enhance Relax-and-Recover (rear)" in

Finally you may of course detect new issues and bugs in rear.
See "How to contribute to Relax-and-Recover (rear)" in

Kind Regards
Johannes Meixner
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)

More information about the rear-users mailing list