Vijay Avarachen writes:

>      I seem to have backupPC working smoothly but I am having difficulty
> narrowing down files that I want to backup.  I am using tar to backup my
> linux host and I want to only backup files with specific extensions. I know
> how to do this via command line (--exclude="`find /target/dir | grep -i
> *.ext ).  However I cannot figure out how to do this in backupPC.  I have a
> feeling it has something to do with $fileList, but I can't figure out how to
> make use of it.  Currently I have a terribly long list of exclusions, but I
> would rather have a short list of inclusion and exclude everythign else.

You can use $Conf{BackupFilesOnly} and $Conf{BackupFilesExclude},
which get converted into arguments to tar, and --exclude respectively.

If that doesn't give you the flexibilty you need, you can
simply replace $Conf{TarClientCmd} with whatever you please.
(Note that $Conf{TarClientCmd} is not executed with a shell,
so backticks etc don't work - you can point $Conf{TarClientCmd}
at a shell script if you need shell features.)

Tar --exclude supports regexp, so instead of

    --exclude="`find /target/dir | grep -i *.ext

why not just:

    --exclude="/target/dir/*.ext"

provided you specify --wildcards-match-slash.  See the detailed
tar info.

Craig


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to