BackupPC-users

Re: [BackupPC-users] How to delete specific files from backups? (with BackupPC_deleteFile.pl)

2011-05-23 11:16:36
Subject: Re: [BackupPC-users] How to delete specific files from backups? (with BackupPC_deleteFile.pl)
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 23 May 2011 11:14:51 -0400
Jeffrey J. Kosowsky wrote at about 10:51:01 -0400 on Monday, May 23, 2011:
 > Nick Bright wrote at about 23:27:58 -0500 on Sunday, May 22, 2011:
 >  > On 5/22/2011 7:14 PM, Nick Bright wrote:
 >  > > Sounds to me like the BackupPC_deleteFile script is the way to go:
 >  > > 
 > http://sourceforge.net/apps/mediawiki/backuppc/index.php?title=BackupPC_DeleteFile
 >  > >
 >  > > I found it some time after posting my original question.
 >  > >
 >  > 
 >  > I am having a great deal of difficulty getting this to work. It runs OK 
 >  > but the output is just:
 >  > 
 >  > [hostname][][472 483 507 531 541 551 562 574 584 589 594 595 596 597 598 
 >  > 599 600 601][]
 >  >    ANTE[hostname]:
 >  >    BAKS[hostname]: 472 483 507 531 541 551 562 574 584 589 594 595 596 
 >  > 597 598 599 600 601
 >  >    POST[hostname]:
 >  >    LOOKING AT: [hostname] [][472 483 507 531 541 551 562 574 584 589 594 
 >  > 595 596 597 598 599 600 601][] **NO DELETIONS ON THIS HOST**
 >  > 
 >  > 
 >  > Files/directories deleted: 0(0)     Files/directories copied: 0
 >  > Delete attrib set: 0                Attributes cleared: 0
 >  > Empty attrib files deleted: 0       Errors: 0
 >  > 
 >  > No matter what options I give it, it just won't delete anything.
 >  > 
 >  > There is a complete void of examples, and there is no indication of what 
 >  > valid inputs are for the arguments are in the documention, so I'm not 
 >  > even sure if I'm doing it correctly.
 >  > 
 >  > I've tried:
 >  > 
 >  > BackupPC_deleteFile.pl -h hostname -n - -d 4 /var/log/maillog
 >  > BackupPC_deleteFile.pl -h hostname -n 600 -d 4 /var/log/maillog
 >  > BackupPC_deleteFile.pl -h hostname -n 600 -d 4 
 >  > /backup/backuppc/pc/hostname/600/f%2f/fvar/flog/fmaillog
 >  > BackupPC_deleteFile.pl -h hostname -n - -d 4 /fvar/flog/fmaillog
 >  > 
 > 
 > The usage *clearly* gives a list of required input parameters,
 > including share name:
 >         -s <share>
 > Also, the usage says to use '-m' if you want to use unmangled paths.
 > 
 > So true there are not any specific examples, but the usage (-h) is
 > rather completely documented...

To clarify, here is the quote from the usage:
    -s <share>    Share name (or - for all) from which path is offset
                  (don't include the 'f' mangle)
                  NOTE: if unmangle option (-m) is not set then the share name
                  is optional and if not specified then it must instead be
                  included in mangled form as part of the file/directory names.

So, you can do any of the following assuming your share name is '/'

With mangling
BackupPC_deleteFile.pl -h hostname -n - -d 4 f%2f/fvar/flog/fmaillog
BackupPC_deleteFile.pl -h hostname -n - -s / -d 4 /fvar/flog/fmaillog
BackupPC_deleteFile.pl -h hostname -n - -s %2f -d 4 /fvar/flog/fmaillog

Without mangling:
BackupPC_deleteFile.pl -h hostname -n - -s / -m -d 4 /var/log/maillog
BackupPC_deleteFile.pl -h hostname -n - -s %2f -m -d 4 /var/log/maillog

You could also use '-s -' to include any share and you could remove
the leading slash before (f)var in all but the first example.

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
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/