[rear-users] Confusion over EXCLUDE_BACKUP vs. BACKUP_PROG_EXCLUDE

David Yang randomfire at gmail.com
Sat Jul 30 00:44:35 CEST 2016

Johannes, many thanks for pointing me in the right direction.  I've been
looking through the code, but am a bit more rusty with shell scripting than
I would like to admit.  I do know there are certain variables that don't
appear in any of the RSYNC scripts, but they do affect whether a filesystem
is excluded or not when backing up with rsync.  For example,
EXCLUDE_MOUNTPOINTS seem to be the variable
backup/RSYNC/default/40_create_include_exclude_files.sh is looking for, but
using EXCLUDE_COMPONENTS is what actually works, even though I don't see
that variable in any of the Rsync related scripts.  It's a bit of a mystery
how the variable gets used when it doesn't appear.

I will dig a bit more and see if I can make sense of it.

Appreciate the help,

On Fri, Jul 29, 2016 at 1:33 AM, Johannes Meixner <jsmeix at suse.de> wrote:

> Hello,
> 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
> https://en.opensuse.org/SDB:Disaster_Recovery
> For example when the TSM backup method is used one cannot
> specify in rear what TSM should backup and restore, see
> https://github.com/rear/rear/issues/823
> 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
> usr/share/rear/backup/NETFS/default/50_make_backup.sh
> 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
> versus
>   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
> https://www.gnu.org/software/tar/manual/tar.html#SEC112
> https://www.gnu.org/software/tar/manual/tar.html#SEC113
> 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.
> https://github.com/rear/rear/issues/475
> Again:
> 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
> https://en.opensuse.org/SDB:Disaster_Recovery
> 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
> https://en.opensuse.org/SDB:Disaster_Recovery
> Finally you may of course detect new issues and bugs in rear.
> See "How to contribute to Relax-and-Recover (rear)" in
> https://en.opensuse.org/SDB:Disaster_Recovery
> Kind Regards
> Johannes Meixner
> --
> SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
> Graham Norton - HRB 21284 (AG Nuernberg)
> _______________________________________________
> rear-users mailing list
> rear-users at lists.relax-and-recover.org
> http://lists.relax-and-recover.org/mailman/listinfo/rear-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.relax-and-recover.org/pipermail/rear-users/attachments/20160729/c73d165d/attachment.html>

More information about the rear-users mailing list