Re: [BackupPC-users] Feature request: Restore Search across all shares/backups
> > [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. > BackupPC_zcat behaves like cat, simply concatenating multiple arguments. You should write a short shell script that iterates through each file, eg in bash: for file in /Bobby/pc/*/XferLOG.*.z ; do echo $file ; BackupPC_zcat $file | egrep "*headphone*" ; done As well as the last modified date? Typically mtimes don't appear in the XferLOG file, so you'll need to use the BackupPC_ls approach instead (which will produce an accurate list of files, whereas the XferLOG file might not show unchanged files depending on the Xfer method and log level etc). Craig -- 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@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] Feature request: Restore Search across all shares/backups
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: newrecv >f+ rw-r--r-- 400, 401165508 Program Files (x86)/Common Files/Digidesign/DAE/Plug-In Settings/Speakerphone/- top 5 tiny speakers/leaking headphone.tfx newrecv >f+ rw-r--r-- 400, 401166501 Program Files (x86)/Common Files/Digidesign/DAE/Plug-In Settings/Speakerphone/tiny stuff/occasional headphone leak.tfx newrecv >f+ rwxr-xr-x 400, 401 29632 Program Files (x86)/VideoLAN/VLC/plugins/audio_filter/libheadphone_channel_mixer_plug in.dll newrecv >f+ rw-r--r-- 400, 401 5263 Program Files/Flux/FluxTAnalyzer.app/Contents/Resources/GEngine/256/headphones. png newrecv >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@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] Feature request: Restore Search across all shares/backups
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. Craig On Wed, Jun 14, 2017 at 10:46 AM, Les Mikesell wrote: > On Wed, Jun 14, 2017 at 8:59 AM, Bob Katz wrote: > > Is it possible to design a search tool that will look for the occurrence > of > > a string in the file name across all shares/backups? > > > > It should come up with any versions of the file, last modified date, etc. > > and what backup it is stored in. Ideally it should allow the user to > > navigate to the file in the backup and then use the normal restore > choices > > to restore it. > > > > > > Wouldn't that be nice? Sometimes we don't know which computer/host might > > have had the file we're looking for and/or we want to go back to an old > > version of that file. > > > > You can sort-of accomplish that using 'find' on the command line at > the top of the backup tree with a pattern that may need to allow for > the filename changes used in the archive.But, I agree that having > it as an option in the web interface would be great - and there it > could even be aware of what host(s) the user is allowed to access. > > -- >Les Mikesell > lesmikes...@gmail.com > > > -- > 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@lists.sourceforge.net > List:https://lists.sourceforge.net/lists/listinfo/backuppc-users > Wiki:http://backuppc.wiki.sourceforge.net > Project: http://backuppc.sourceforge.net/ > -- 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@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] Feature request: Restore Search across all shares/backups
On Wed, Jun 14, 2017 at 8:59 AM, Bob Katz wrote: > Is it possible to design a search tool that will look for the occurrence of > a string in the file name across all shares/backups? > > It should come up with any versions of the file, last modified date, etc. > and what backup it is stored in. Ideally it should allow the user to > navigate to the file in the backup and then use the normal restore choices > to restore it. > > > Wouldn't that be nice? Sometimes we don't know which computer/host might > have had the file we're looking for and/or we want to go back to an old > version of that file. > You can sort-of accomplish that using 'find' on the command line at the top of the backup tree with a pattern that may need to allow for the filename changes used in the archive.But, I agree that having it as an option in the web interface would be great - and there it could even be aware of what host(s) the user is allowed to access. -- Les Mikesell lesmikes...@gmail.com -- 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@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/