BackupPC-users

Re: [BackupPC-users] BackupFilesOnly not working

2016-02-22 14:49:18
Subject: Re: [BackupPC-users] BackupFilesOnly not working
From: Holger Parplies <wbppc AT parplies DOT de>
To: Michael Stowe <mstowe AT chicago.us.mensa DOT org>
Date: Mon, 22 Feb 2016 20:47:17 +0100
Hi,

Michael Stowe wrote on 2016-02-19 10:23:21 -0600 [Re: [BackupPC-users] 
BackupFilesOnly not working]:
> On 2016-02-18 04:45, BrunoVonTroba wrote:
> > BackupPC 3.3.0 on Ubuntu 12.04 LTS
> > I have a share (home) to backup.
> > But i want to exclude specific files to be backed up only once a month
> > So i have crated 2 backup's. In first one backup all in /home
> > directory except virtualbox Files (.vdi). [...]
> > In the second one I want only backup vdi files, so in config i have
> > made option BackupFilesOnly to *.vdi

if I remember correctly, wildcards in BackupFileOnly won't work, simply
because the translation magic in BackupPC does not attempt to handle them.
To include, e.g., /path/to/some/file (and only that), you need to construct
several in- and excludes (or rather, BackupPC does that for you). For the
wildcard case, you'll need to do that yourself. Presuming you don't know what
directories your *.vdi files are in, you'll need to include all directories,
all files named *.vdi, and exclude all other files. You'll either need to use
RsyncArgsExtra or BackupFilesExclude with rsync in-/exclude pattern syntax,
e.g.

        [ '+ */', '+ *.vdi', '- *' ]

(untested, might work). Note that BackupPC passes BackupFilesExclude patterns
to rsync as '--exclude=' arguments, and rsync interprets '--exclude=+ foo'
as an include.

You might also want to --prune-empty-dirs, though I'm not sure if that will
work.

Hope that helps.

> [...]
> > Is there any way to use BackupFilesOnly or i just have to make another
> > Rsync share with virtualbox folders and use it?

That might be preferable if it is possible.

>  From the above, it certainly appears that you're sending an exclude of 
> "*", so I'd expect no files to ever be included in the set of files to 
> be backed up.

Actually, I'd expect *.vdi files located in the transfer root to be included,
but I'm guessing there aren't any in there. All subdirectories are then
excluded, and the include wouldn't apply to files in them anyway. However,
any *directories* named /*.vdi would be included, including all substructure.

The log seems to be from the '/*.vdi' test case. For '*.vdi', much the same
is likely to happen - all subdirectories get excluded, so you don't get any
of the files you want in your backup. I'm not sure if it is documented
somewhere that wildcards are not allowed in BackupFilesOnly, but they aren't.

Regards,
Holger

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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/