BackupPC-users

[BackupPC-users] appending to the Excludes hash

2017-05-04 10:51:50
Subject: [BackupPC-users] appending to the Excludes hash
From: Paul Fox <pgf AT foxharp.boston.ma DOT us>
To: BackupPC Users <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 04 May 2017 10:35:31 -0400
i guess this question is really about perl syntax, but it might
be something commonly done by backuppc users, so here goes:

i have the following in my global config:

    $Conf{BackupFilesExclude} = {
      '/' => [  
        '/proc', 
        '/sys', 
        ],
      '*' => [  
        '.cache',
        '.gvfs',
        'slocate.db',  
        'ID',
        '*._nobackup_',
        '*.o'
        ]
    };


sometimes i wish to augment this list for a particular host:

    $Conf{BackupFilesExclude} = {
      '/' => [  
        '/home', # /home is backed up separately on this host
        '/proc', 
        '/sys', 
        ],
      '*' => [  
        '.cache',
        '.gvfs',
        'slocate.db',  
        'ID',
        '*._nobackup_',
        '*.o'
        ]
    };

clearly it would be cleaner not to have to duplicate the entire
data structure in the host's config file.

is there a nice perl way to do something like this?  syntax
intentionally left vague:

    $Conf{BackupFilesExclude} += { ...  '/home' ....}

i'd like to be able to append to either the '*' catchall array
or a share-specific array.

paul
p.s. it's a testament to backuppc's stability that i've had my
subscription to this list disabled for almost 10 years!
=----------------------
paul fox, pgf AT foxharp.boston.ma DOT us (arlington, ma, where it's 58.5 
degrees)


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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>

Privacy and Data Security Legal Counsel by: https://kimlaw.us