BackupPC-users

Re: [BackupPC-users] How to save all directories expected .....

2009-07-13 19:02:59
Subject: Re: [BackupPC-users] How to save all directories expected .....
From: Chris Robertson <crobertson AT gci DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 13 Jul 2009 14:55:46 -0800
Adam Goryachev wrote:
> Chris Robertson wrote:
>   
>> This depends on how your backups are set up (smbclient being a special
>> case, apparently), but in general...
>>
>> $Conf{BackupFilesExclude} = { '*' => [ '/log' ] };
>>
>> ...should prevent a directory named "log" from being backed up.
>>     
> Does this also stop a folder called /home/logo or a file called
> /usr/bin/logn ?
>   

That depends entirely on the backup transport being used (my example 
apparently won't match directories with smbclient).

That's why I suggested reading the (linked to) documentation of the 
directive.

> ie, afaik, it is a prefix or regex of a pathname
>   

It depends on the method being used for the backup.  From the 
documentation...

The exact behavior is determined by the underlying transport program, 
smbclient or tar. For smbclient the exlclude file list is passed into 
the X option. Simple shell wild-cards using ``*'' or ``?'' are allowed.

For tar, if the exclude file contains a ``/'' it is assumed to be 
anchored at the start of the string. Since all the tar paths start with 
``./'', BackupPC prepends a ``.'' if the exclude file starts with a ``/''.

... and then ...

 Users report that for smbclient you should specify a directory followed 
by ``/*'', eg: ``/proc/*'', instead of just ``/proc''.

... but no mention of rsync.  Let's see if RsyncClientCmd gives a 
definite answer ...

$Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';

    Full command to run rsync on the client machine. The following 
variables are substituted at run-time:

           $host           host name being backed up
           $hostIP         host's IP address
           $shareName      share name to backup (ie: top-level directory 
path)
           $rsyncPath      same as $Conf{RsyncClientPath}
           $sshPath        same as $Conf{SshPath}
           $argList        argument list, built from $Conf{RsyncArgs},
                           $shareName, $Conf{BackupFilesExclude} and
                           $Conf{BackupFilesOnly}

...Not really.  argList is only mentioned in relation to RsyncClientCmd 
and RsyncClientRestoreCmd.  So, in closing, to be clear, my example* 
should be used ONLY as a starting point for performing your own research 
and experimentation.  :o)

> Regards,
> Adam

Chris

* And to be sure, any example you find or are given from anyone or 
anywhere not materially invested in your success...


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
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/