BackupPC-users

Re: [BackupPC-users] Feature request: Restore Search across all shares/backups

2017-06-15 15:03:35
Subject: Re: [BackupPC-users] Feature request: Restore Search across all shares/backups
From: Bob Katz <bobkatz AT digido DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 15 Jun 2017 15:02:48 -0400
On Wed, 2017-06-14 at 21:27 -0700, Craig Barratt wrote:

> Les is right for 3.x.
> 
> For 4.x the files are not stored in the backup tree.  So you'll need
> to use BackupPC_ls -R, or you could also grep the XferLOG.nnn.z files
> (although the format and what appears or not depends on the
> XferMethod).
> 
> Examples:
> 
> BackupPC_ls -R -h HOST -n NUM -s SHARE / | egrep FILENAME
> BackupPC_zcat TOPDIR/pc/HOST/XferLOG.NUM.z | egrep FILENAME
> 
> For BackupPC_ls you'll need to write a script to iterate over every
> HOST, backup NUM and SHARE.  Or you could use wildcards with
> BackupPC_zcat for HOST and/or NUM.
> 
> I'd rather not build this into the CGI interface, since the running
> times could be very long.
> 

Thanks, Craig for the syntax. I would not have been able to come up
with that command line on my own without your example! So I'm
experimenting with zcat and grep search as I think this search
mechanism is very important to ensure restore success. 

Here was my first search, for the occurrence of the word "headphone" in
any file from any backup from any host:

[backuppc@localhost bin]$ ./BackupPC_zcat /Bobby/pc/*/XferLOG.*.z |
egrep *headphone*


The output of this command is instantaneous! So the search from the CLI
is very powerful and VERY fast. The problem is that the results do not
tell which backup has the resulting file, the backup number or the 
modification date. 

Here is some of the output result:

new    recv >f+++++++++ rw-r--r--      400,     401    165508 Program
Files (x86)/Common Files/Digidesign/DAE/Plug-In Settings/Speakerphone/-
top 5 tiny speakers/leaking headphone.tfx
    new    recv >f+++++++++ rw-r--r--      400,     401    166501
Program Files (x86)/Common Files/Digidesign/DAE/Plug-In
Settings/Speakerphone/tiny stuff/occasional headphone leak.tfx
    new    recv >f+++++++++ rwxr-xr-x      400,     401     29632
Program Files
(x86)/VideoLAN/VLC/plugins/audio_filter/libheadphone_channel_mixer_plug
in.dll
    new    recv >f+++++++++ rw-r--r--      400,     401      5263
Program
Files/Flux/FluxTAnalyzer.app/Contents/Resources/GEngine/256/headphones.
png
    new    recv >f+++++++++ rw-r--r--      400,     401     57931
ProgramData/Audio Ease/Speakerphone/Main Presets/-top 5 tiny
speakers/leaking headphone.spp


Do you think you or anyone could come up with a command line or script
that tells us which host the file came from and possibly which backup
number if that is necessary? As well as the last modified date? I know
I may be asking for too much, but backuppc is so powerful I dream of a
comprehensive search facility to make restoration easier considering
years and years of backups and many hosts, if you get my drift. 

I am puzzled how the master command could be concatenated with "zcat"?
Is that a feature of perl? Forgive my programming ignorance!

I think we could live with a command line result as we could then go to
the gui to do the restore. 

Thanks,


Bob 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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/


ADSM.ORG Privacy and Data Security by KimLaw, PLLC