BackupPC-users

Re: [BackupPC-users] Includes and Excludes

2008-06-18 02:56:59
Subject: Re: [BackupPC-users] Includes and Excludes
From: Craig Barratt <cbarratt AT users.sourceforge DOT net>
To: Christoph Litauer <litauer AT uni-koblenz DOT de>
Date: Tue, 17 Jun 2008 23:56:47 -0700
Christoph writes:

> I try to backup a share /export/user1 containing user data starting with
> a-f except for subdirectories ending on _DELETED. Is it possible?

BackupPC takes $Conf{BackupFilesOnly} and $Conf{BackupFilesExclude} and
converts them into rsync include/exclude rules:

    > Sent include: /[a-z]*
    > Sent exclude: /*
    > Sent exclude: *_DELETED
    > Sent exclude: search.sqlite

Rsync checks the include/exclude rules in order until it finds a match.
The problem is that the wildcard /[a-z]* matches /aa_DELETED, so
it assume that file is included, and the *_DELETED ruled is not
checked.

One alternative is to not use $Conf{BackupFilesExclude} and
$Conf{BackupFilesOnly} and instead to build your own
include/exclude options in $Conf{RsyncArgs}.  I haven't
tested this, but something like this should work:

    $Conf{RsyncArgs} = [
      '--numeric-ids',
      '--perms',
      '--owner',
      '--group',
      '-D',
      '--links',
      '--times',
      '--block-size=2048',
      '--recursive',
      '--checksum-seed=32761',
      '--exclude=*_DELETED',
      '--exclude=search.sqlite',
      '--include=/[a-z]*',
      '--exclude=/*',
    ];

Craig

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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>