BackupPC-users

Re: [BackupPC-users] Syntax for excluding .gvfs

2010-05-10 02:11:49
Subject: Re: [BackupPC-users] Syntax for excluding .gvfs
From: Luis Paulo <luis.barbas AT gmail DOT com>
To: Steve Blackwell <zephod AT cfl.rr DOT com>
Date: Mon, 10 May 2010 07:09:40 +0100
On Mon, May 10, 2010 at 4:51 AM, Steve Blackwell <zephod AT cfl.rr DOT com> 
wrote:
> On Mon, 10 May 2010 03:51:20 +0100
> Luis Paulo <luis.barbas AT gmail DOT com> wrote:
>
>> On Mon, May 10, 2010 at 3:17 AM, Steve Blackwell <zephod AT cfl.rr DOT com>
>> wrote:
>> > On Sat, 8 May 2010 23:26:40 +0100
>> > Luis Paulo <luis.barbas AT gmail DOT com> wrote:
>> >
>> >> On Sat, May 8, 2010 at 7:49 PM, Steve Blackwell <zephod AT cfl.rr DOT com>
>> >> wrote:
>> >> > On Sat, 8 May 2010 17:35:47 +0100
>> >> >[..]
>> >> > Contents of file /media/disk/pc/steve/XferLOG.bad.z, modified
>> >> > 2010-05-08 14:41:36
>> >> >
>> >> > Running: /usr/bin/sudo /bin/tar -c -v -f - -C /home/steve
>> >> > --totals --newer=2010-05-06 00:00:09 . incr backup started back
>> >> > to 2010-05-06 00:00:09 (backup #284) for directory /home/steve
>> >> > Xfer PIDs are now 30316,30315 /bin/tar: ./.gvfs: Cannot stat:
>> >> > Permission denied ...
>> >> > rest of the transfer log.
>> >> >[...]
>> >>
>> >> Well, something is not right
>> >
>> > I won't disagree with you there!
>> >
>> >> You should have an --exclude=./.gvfs on your Running: line
>> >> as in (for /proc)
>> >> Running: /usr/bin/env LC_ALL=C sudo /bin/tar -c -v -f - -C /
>> >> --totals --newer=2010-05-07 04:00:03 --exclude=./proc/* ...
>> >
>> > As I understand it, the variable $fileList is created based on the
>> > includes and excludes or more specifically based on BackupFilesOnly
>> > or BackupFilesExclude.
>> >
>> > TarFullArgs is set to $fileList and
>> > TarIncrArgs is set to --newer=$incrDate $fileList
>> >
>> > and so you won't see a --exclude switch in the log.
>> >
>> > Someone, please correct me if I'm wrong.
>> >
>> > Steve
>> >
>>
>> You should see an --exclude on the log. I see on mine.
>>
>> I assume you are trying to exclude .gvfs in the BackupFilesExclude on
>> the GUI. You have a Delete button, then one or more Insert and Delete
>> buttons, and you type ".gvfs" after that. Right?
>> And what you have on the left of the first delete button?
>>
>> Please post your computer.pl config file (replace computer with your
>> client name). It's easier to check
>> If I see something strange I'll be happy to guide you through the GUI.
>>
>> A note: You may have BackupFilesOnly OR BackupFilesExclude, not both.
>>
>> Regards
>> Luis
> OK, here is my steve.pl file
>
> $Conf{TarClientCmd} = '/usr/bin/sudo $tarPath -c -v -f - -C $shareName
> --totals';
> $Conf{TarFullArgs} = '$fileList';
> $Conf{TarClientRestoreCmd} = '/usr/bin/sudo $tarPath -x -p
> --numeric-owner --same-owner -v -f - -C $shareName';
> $Conf{TarClientPath} = '/bin/tar';
> $Conf{BackupFilesExclude} = {
>  '/' => [
>    '/proc',
>    '/sys',
>    '/tmp',
>    '/media',
>    '/selinux',
>    '/misc',
>    '/home/*/.gvfs'
>  ]
> };
> $Conf{TarIncrArgs} = '--newer=$incrDate $fileList';
> $Conf{TarShareName} = [
>  '/'
> ];
> $Conf{BlackoutPeriods} = [
>  {
>    'hourEnd' => '23.5',
>    'weekDays' => [
>      '0',
>      '1',
>      '2',
>      '3',
>      '4',
>      '5',
>      '6'
>    ],
>    'hourBegin' => '8.5'
>  }
> ];
>
> Thanks,
> Steve
>

Nothing strange there, as far as I can see...
May try to use the full /home/steve/.gvfs (I think it's /home/steve),
just to see if it works

You may have
$Conf{XferMethod} = 'tar';
But that should come from your config.pl (and not the problem)

Your $Conf{BackupFilesExclude} is only good for share '/'
When you use share /home/steve
$Conf{TarShareName} = [
 '/home/steve/'
 ];
You'll have to change BackupFilesExclude accordingly

Don't really know why you don't have the --exclude. An example of my logs is

Running: /usr/bin/env LC_ALL=C sudo /bin/tar -c -v -f - -C /home
--totals --newer=2010-05-09 04:00:02 --exclude=./home/lpaulo/backup/*
--exclude=./home/backuppc/fuse/* .
incr backup started back to 2010-05-09 04:00:02 (backup #88) for directory /home

(I don't have .gvfs on this machine, not even X. On another machines I
exclude .gvfs but using rsync)

No more ideas
I've check http://www.gnu.org/software/tar/manual/tar.html and it says:

6.5 Wildcards Patterns and Matching
Periods (‘.’) or forward slashes (‘/’) are not considered special for
wildcard matches

and
Problems with Using the exclude Options
When you use ‘--exclude=pattern’, be sure to quote the pattern
parameter, so GNU tar sees wildcard characters like ‘*’. If you do not
do this, the shell might expand the ‘*’ itself using files at hand, so
tar might receive a list of files instead of one pattern, or none at
all, making the command somewhat illegal. This might not correspond to
what you want.

So, I don't think 'the dot is the problem, maybe putting "" around
/home/*/.gvfs, or putting it directly on the TarIncrArgs and
TarFullArgs (--exclude='/home/*/.gvfs' $fileList, ...)

Please check if the full /home/steve/.gvfs.
I think I may have a similar problem with '.Trash-*', I'll try to do
some experiment also.

PS: Just remember. You may (or not) have to go Admin Options on the
menu and Reload the server configuration after you make changes on the
config.
or
/etc/init.d/backuppc restart

Just in case :)

Sorry about the long post
Regards
Luis

------------------------------------------------------------------------------

_______________________________________________
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/