BackupPC-users

Re: [BackupPC-users] Search for File

2011-09-28 11:23:15
Subject: Re: [BackupPC-users] Search for File
From: Arnold Krille <arnold AT arnoldarts DOT de>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 28 Sep 2011 17:20:57 +0200
On Wednesday 28 September 2011 16:30:18 Timothy J Massey wrote:
> Gerald Brandt <gbr AT majentis DOT com> wrote on 09/28/2011 10:15:12 AM:
> > I need to search for a specific file on a host, via backuppc.  Is
> > there a way to search a host backup, so I don't have to manually go
> > through all directories via the web interface?
> 
> The easiest, most direct way of doing that would be:
> 
> cd /path/to/host/pc/directory
> find . | grep "f<filename>"
> 
> I'm sure someone with more shell-fu will give you a much better command
> line (and I look forward to learning something!).

Here you are:

find <path_where_to_start> -iname <string_to_search>

iname means case-insensitive, so you don't have to care about that.
if you want to search for a combination of directory and filename, you have to 
think about the 'f' backuppc puts in front.

Using find you will realize that its rather slow and has your disk rattling 
away. Better to use the indexing services, for example locate:

locate <string_to_search>

gives a list of hits. But only from the state when locate last rebuilt its 
index (should happen daily/nightly). That is good enough to find files last 
seen 
two weeks ago, but doesn't find that file you just downloaded and can't 
remember 
where you saved it.

There are also disk-indexing services with web-frontends, htdig comes to mind. 
That even finds stuff inside the files.

Have fun,

Arnold

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
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/