BackupPC-users

Re: [BackupPC-users] Problem with Full Backups and Exclussions

2015-01-05 15:25:26
Subject: Re: [BackupPC-users] Problem with Full Backups and Exclussions
From: Holger Parplies <wbppc AT parplies DOT de>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 5 Jan 2015 21:22:17 +0100
Hi,

Michelle Dupont wrote on 2015-01-05 17:22:35 +0100 [Re: [BackupPC-users] 
Problem with Full Backups and Exclussions]:
> On Mon, 5 Jan 2015, Francisco Suarez wrote:
> 
> >Thanks Michelle,
> >I'm not sure I understand well how the exclusions work still. Only need to 
> >all content exclude these directories. When you say share do you mean 
> >share's already entered under "RsyncShareName" for example "/home".

if you're using rsync(d), then, yes, what you enter as $Conf{RsyncShareName}
is the (list of) share name(s). You need to use *either* these *exact* values
as keys in BackupFilesExclude or the literal value * for "all shares for which
there is no matching key". For example,

> If you define 2 RsyncShareName :
> /home
> /var

(i.e. $Conf {RsyncShareName} = [ '/home', '/var' ]), then the following
(alternative) examples would give you meaningful excludes:

# 1.) exclude /home/cache, no excludes under /var
$Conf {BackupFilesExclude} = {
        '/home' => [ '/cache' ],
};

# 2.) exclude /home/cache and /var/cache
$Conf {BackupFilesExclude} = {
        '*' => [ '/cache' ],
};

# 3.) exclude /home/foo and /var/cache (note how the * entry matches /var
#     because there is no explicit entry for /var, and how it doesn't match
#     /home because there is an explicit entry)
$Conf {BackupFilesExclude} = {
        '/home' => [ '/foo' ],
        '*' => [ '/cache' ],
};

# 4.) exclude /home/cache and /var/cache (note how the /home/ entry doesn't
#     match /home because it is not literally identical, even though file
#     system semantics would suggest otherwise)
$Conf {BackupFilesExclude} = {
        '/home/' => [ '/foo' ],
        '*' => [ '/cache' ],
};

> [...]
> >Which of these will accomplish the desired result to exclude content on 
> >the directories listed?
> >
> >$Conf{BackupFilesExclude} = {
> >  '/' => [
> >    '/home/theplans/log/*',
> >    '/home/run/positions/trace/*',
> >    '/home/hun/res/received/*',  
> >  ]
> >};

Since you *appear* to have $Conf{RsyncShareName} = '/home', it would be

$Conf {BackupFilesExclude} = {
        '/home' => [
                '/theplans/log',
                '/run/positions/trace',
                '/hun/res/received'
        ]
};

presuming you also want to exclude the directories. If you want to get them
and only exclude the contents of the directories, add the '/*' as you did
above.

Excludes and includes are always specific to the XferMethod used. For more
details on what you can do with rsync(d), see the rsync man page. For tar and
smb, the syntax may differ, though in the simple case (only fixed paths, no
wildcards) it should work much the same (though smb always seems to cause
confusion with the path separators).

Hope that helps.

Regards,
Holger

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
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>