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

2011-05-23 Thread Holger Parplies
Hi,

Nick Bright wrote on 2011-05-22 23:27:58 -0500 [Re: [BackupPC-users] How to 
delete specific files from backups? (with BackupPC_deleteFile.pl)]:
 On 5/22/2011 7:14 PM, Nick Bright wrote:
  Sounds to me like the BackupPC_deleteFile script is the way to go:
 [...]
 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.

Jeffrey? ;-)

 I've tried:
 
 BackupPC_deleteFile.pl -h hostname -n - -d 4 /var/log/maillog
 [...]
 
 But they all just give the same output - nothing deleted.

From that example, the general syntax of the BackupPC_* commands provided with
BackupPC, and the expectation that Jeffrey will follow their conventions,
I'd expect you need to provide a '-s sharename' argument and probably
the path within this share as either relative or absolute path. So, if you
have a share '/var', that would be

BackupPC_deleteFile.pl -h hostname -n - -d 4 -s /var /log/maillog

or possibly

BackupPC_deleteFile.pl -h hostname -n - -d 4 -s /var log/maillog

(don't know what '-d 4' does, though; aside from that, where did you get
'-n -' from? Maybe try '-n -1'?).

You probably have a share '/', so it would be '-s / /var/log/maillog' or
'-s / var/log/maillog' instead. It really depends on how you set your
backups up, because that determines how BackupPC stores them.

But I'm just guessing. I'd look at the script, but I don't really have the
time right now. Wait for an authoritative answer if you don't feel like
experimenting (but you probably do - you've already done so ;-).

Hope that helps.

Regards,
Holger

--
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@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


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

2011-05-23 Thread Jeffrey J. Kosowsky
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: 0Attributes 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...

  But they all just give the same output - nothing deleted.
  
  The key thing that's missing from the documentation is how to specify 
  the file/directory that you would like to delete. Do you specify the 
  file on the local filesystem? Do you specify the file on the remote host 
  that's been backed up? Do you have to specify the full path name, or the 
  relative path name?

The path names are relative to the share name (which you have
omitted). Leading slash names are optional.

  
  Any advice appreciated
  
  -- 
  ---
  - Nick Bright -
  ---
  - Are your files safe?-
  - Valnet Vault - Secure Cloud Backup  -
  - More information  30 day free trial at -
  - http://www.valnet.net/services/valnet-vault -
  ---
  
  
  --
  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@lists.sourceforge.net
  List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
  Wiki:http://backuppc.wiki.sourceforge.net
  Project: http://backuppc.sourceforge.net/

--
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@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


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

2011-05-23 Thread Jeffrey J. Kosowsky
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: 0Attributes 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 shareShare 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@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


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

2011-05-23 Thread Jeffrey J. Kosowsky
Holger Parplies wrote at about 16:28:06 +0200 on Monday, May 23, 2011:
  Hi,
  
  Nick Bright wrote on 2011-05-22 23:27:58 -0500 [Re: [BackupPC-users] How to 
  delete specific files from backups? (with BackupPC_deleteFile.pl)]:
   On 5/22/2011 7:14 PM, Nick Bright wrote:
Sounds to me like the BackupPC_deleteFile script is the way to go:
   [...]
   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.
  
  Jeffrey? ;-)
I responded :)
  
   I've tried:
   
   BackupPC_deleteFile.pl -h hostname -n - -d 4 /var/log/maillog
   [...]
   
   But they all just give the same output - nothing deleted.
  
  From that example, the general syntax of the BackupPC_* commands provided 
  with
  BackupPC, and the expectation that Jeffrey will follow their conventions,
  I'd expect you need to provide a '-s sharename' argument and probably
  the path within this share as either relative or absolute path. So, if you
  have a share '/var', that would be
  
   BackupPC_deleteFile.pl -h hostname -n - -d 4 -s /var /log/maillog
  

Correct if /var is the share or if '/' is the share then it would be
-s '/' or alternatively -s %2f (which is how it is encoded in your pc
directory). Note for /var as the share you could also use the %2fvar
encoding.

For the file/directory names, the default is to use mangled paths so
you would need to write /flog/fmaillog unless you use the '-m' flag to
accept unmangled paths in which case /var/log/maillog works fine. The
leading / is optional. 

If using mangled paths then as a special case you can avoid using the
share name if you use the full *mangled* and encoded path from root
which in this case would be:
 f%2f/fvar/flog/fmaillog

 (don't know what '-d 4' does, though; aside from that, where did you get
 '-n -' from? Maybe try '-n -1'?).

structure of incremental backup dependen
The '-' allows for a range of backup numbers. Say '20-35' and
extending that convention:
   '-35' is all backups up to 35 inclusive
   '20-' is all backups from 20 and on
   '-' is all backups
Then by extension for consistency, '-' is also used as the wildcard
for host names and share names. Note using '*' as a wildcard is not a
good idea since it would need to be quoted to prevent the shell from
interpreting it.

The '-d' specifies debugging levels so for example you can see what
exact hosts/shares/backups are being searched and so you can see the
hierarchy of incrementals and what exactly is being deleted/moved
etc. to preserve the inheritance based on the specific backup numbers
you want deleted. It also allows you to see what attributes are erased
vs. marked as type=deleted etc.

  You probably have a share '/', so it would be '-s / /var/log/maillog' or
  '-s / var/log/maillog' instead. It really depends on how you set your
  backups up, because that determines how BackupPC stores them.
  
  But I'm just guessing.
You guessed right.

 I'd look at the script, but I don't really have the
  time right now. Wait for an authoritative answer if you don't feel like
  experimenting (but you probably do - you've already done so ;-).
  
  Hope that helps.

I'm sure it helped him, but I just filled in a little more.

--
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@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


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

2011-05-23 Thread Nick Bright
On 5/23/2011 10:14 AM, Jeffrey J. Kosowsky wrote:
 The usage *clearly* gives a list of required input parameters,
 including share name:
  -sshare
 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...

Just saying what's expected isn't the same as giving an example of valid 
input. My root question really came down to What is a share? What goes 
there?, How do I specify a filename? and What does mangled mean? How 
do I mangle?. If you already *know* these things, it's very simple. If 
you don't, then the lack of examples makes it very difficult to 
understand what to do. I understand what these mean now, thanks to your 
thorough explanation.

 To clarify, here is the quote from the usage:
  -sshare 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.

Thank you very much Jeffrey. The problem was my lack of understanding 
regarding what the share name is and represents. Having set it and 
forget it with BackupPC almost three years ago, I didn't recall those 
basic concepts.

I would suggest, to help out people such as myself who may not be strong 
in all of the concepts of BackupPC, to put what you've replied to me 
with on to the wiki page for the BackupPC_deleteFile script, as your 
explanation is quite clear and concise.

Again, thank you for taking the time to reply with very helpful information.

-- 
---
-  Nick Bright-
---
- Are your files safe?-
- Valnet Vault - Secure Cloud Backup  -
- More information  30 day free trial at -
- http://www.valnet.net/services/valnet-vault -
---


--
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@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


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

2011-05-22 Thread Nick Bright
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: 0Attributes 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

But they all just give the same output - nothing deleted.

The key thing that's missing from the documentation is how to specify 
the file/directory that you would like to delete. Do you specify the 
file on the local filesystem? Do you specify the file on the remote host 
that's been backed up? Do you have to specify the full path name, or the 
relative path name?

Any advice appreciated

-- 
---
- Nick Bright -
---
- Are your files safe?-
- Valnet Vault - Secure Cloud Backup  -
- More information  30 day free trial at -
- http://www.valnet.net/services/valnet-vault -
---


--
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@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/