BackupPC-users

[BackupPC-users] rsync exclusion list - apply to multiple shares

2016-09-19 09:00:46
Subject: [BackupPC-users] rsync exclusion list - apply to multiple shares
From: cardiganimpatience <backuppc-forum AT backupcentral DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Mon, 19 Sep 2016 05:59:44 -0700
Just following up on this because I got a very useful reply from Holger which 
explained that a variable can be used to hold a list of excludes, but noted 
that doing so will break the ability to use the GUI. If the GUI is used to edit 
a host's config after manually setting a variable all changes will be 
overwritten.

>>From Holger:

You simply create a variable in the host (or even global) config file ...

&nbsp; &nbsp; &nbsp; &nbsp; my @common_excludes = &#40;'*access_log*', 
'.apdisk', '.cache'&#41;;

and then reference that multiple times:

&nbsp; &nbsp; &nbsp; &nbsp; $Conf &#123;BackupFilesExclude&#125; = &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/home' => &#91; 
@common_excludes &#93;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/var'&nbsp; => &#91; 
@common_excludes, '/lib/mysql' &#93;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/usr'&nbsp; => &#91; 
@common_excludes &#93;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/boot' => &#91; 
@common_excludes &#93;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/data' => &#91; 
@common_excludes &#93;,
&nbsp; &nbsp; &nbsp; &nbsp; &#125;;

or

&nbsp; &nbsp; &nbsp; &nbsp; $Conf &#123;BackupFilesExclude&#125; = &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/var'&nbsp; &nbsp; 
&nbsp;=> &#91; @common_excludes, '/lib/mysql' &#93;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/example' => &#91; 
&#93;,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# no excludes here
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '*'&nbsp; &nbsp; &nbsp; 
&nbsp; => &#91; @common_excludes &#93;,
&nbsp; &nbsp; &nbsp; &nbsp; &#125;;


Thanks Holger for your help! I've implemented it and it saves me much messiness 
in my config files.  8)

+----------------------------------------------------------------------
|This was sent by itismike AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------



------------------------------------------------------------------------------
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>
  • [BackupPC-users] rsync exclusion list - apply to multiple shares, cardiganimpatience <=