BackupPC-users

Re: [BackupPC-users] Local backups

2009-03-23 08:49:23
Subject: Re: [BackupPC-users] Local backups
From: Paul Dugas <Paul AT dugas DOT cc>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 23 Mar 2009 08:43:44 -0400
On Sun, 2009-03-22 at 22:34 -0700, Craig Barratt wrote:
> Paul writes:
> 
> > I tried just changing 'RsyncClientCmd' to "$rsyncPath $argList+" but it
> > seems BackupPC is expecting the SSH and is now improperly escaping
> > 'RsyncArgs'.  The hitch is with a space in one.
> > 
> > $Conf{RsyncClientCmd} = '$rsyncPath $argList+';
> > $Conf{RsyncArgs} = [
> >   '--numeric-ids',
> >   '--perms',
> >   '--owner',
> >   '--group',
> >   '-D',
> >   '--links',
> >   '--hard-links',
> >   '--times',
> >   '--block-size=2048',
> >   '--recursive',
> >   '--filter',
> >   'dir-merge /.backuppc-filter'
> > ];
> > 
> > The last two are an addition I use to allow users to exclude files from
> > the backup with properly crafted .backuppc-filter files in their
> > directories.
> > 
> > I end up with an extra slash after the dir-merge.
> > 
> > /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group
> > -D --links --hard-links --times --block-size=2048 --recursive --filter
> > dir-merge\ /.backuppc-filter --ignore-times . /etc/
> 
> The "\" is to escape the following " " since it is a single argument.
> 
> Actually, BackupPC doesn't execute the command as printed.  Rather,
> it keeps the arguments as an array and passes them directly to exec().
> So rsync should see a single argument
> 
>     dir-merge /.backuppc-filter
> 
> right after '--filter'.
> 
> For logging purposes, the command is turned into a single string and
> escaped as though it was going to be executed by a shell (although it
> isn't). That's when the "\" gets added.
> 

So I just tried it again to make sure I got the error message correct.
Here's what I'm getting:

  full backup started for directory /etc (baseline backup #50)
  Running: /usr/bin/rsync --server --sender --numeric-ids --perms --owner 
--group -D --links --hard-links --times --block-size=2048 --recursive --filter 
dir-merge\\\ /.backuppc-filter --ignore-times . /etc/
  Xfer PIDs are now 24521
  Got remote protocol 1852534357
  Fatal error (bad version): Unknown filter rule: `dir-merge\ /.backuppc-filter'

Maybe what I'm seeing is not caused by the escaping?

Paul

-- 
Paul Dugas - paul AT dugas DOT cc - 404.932.1355

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
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>