John writes:

> I am using BackupPC-3.1.0 and I want to back up a share using the
> following exclusion patterns under rsync:
> 
>   + */
>   + */Maildir/**
>   - *
> 
> basically I want to include any directory tree starting with the
> directory Maildir one level below the root of the transfer: specified
> as /home, and passed to the remote rsync as /home/.
> 
> I specify this in a host specific config file using:
> 
>   $Conf{BackupFilesOnly} = {
>     '/home' => ['+ */', '+ */Maildir/**', '- *'],
>   };
> 
> If I look at the xferlog after letting it run for a bit and killing
> the job (is there any way to view this log without killing the job
> first??) I see:
> 
>   ...
>   Checksum caching enabled (checksumSeed = 32761)
>   Got checksumSeed 0x7ff9
>   Sent include: /+ *
>   Sent include: /*
>   Sent include: /*/Maildir
>   Sent include: /*/Maildir/**
>   Sent include: /- *
>   Sent exclude: /*
>   Sent exclude: /*/*
>   Sent exclude: /*/Maildir/*
>   Got file list: 276916 entries
>   Child PID is 9628
>   Xfer PIDs are now 1690,9628
>   ...
>
> which looks wrong as the +/- specifiers look like they are included in
> the paths. Also the '*/' specifier needed to recursively include all
> directories is missing.

As you discovered, BackupPC_dump isn't aware of rsync's special
conventions for $Conf{BackupFilesOnly}.  

> I have no clue where:
>     Sent exclude: /*/Maildir/*

To include a specific path or file you have to include each
directory and exclude all others, so this is a result of your
include of  */Maildir/**.

> I can't put these in RsyncArgs as that array is used for every share
> and would result in in nothing being backed up for any other share.

My suggestion would to specify it directly with RsyncArgs, but
you correctly point out that you can't make the settings depend
upon the share name.  You could split it out as seperate backup
clients (use the alias feature), but that isn't elegant.

It probably suggests a patch that extends the syntax in
$Conf{BackupFilesOnly} for rsync is in order.

> Now the funnypart about this, is that is seems to work properly. The
> files that I saw transferred before I killed the backup actually look
> like they matched my criteria, but I am at a loss as to how this is
> occurring.

You'd have to carefully look at the rsync documentation and/or source
code to figure out why the mangled exclude/includes work.

Craig

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to