BackupPC-users

Re: [BackupPC-users] Search for File

2011-09-28 21:33:24
Subject: Re: [BackupPC-users] Search for File
From: Tim Connors <tconnors AT rather.puzzling DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 29 Sep 2011 11:15:31 +1000 (EST)
On Wed, 28 Sep 2011, Timothy J Massey wrote:

> Arnold Krille <arnold AT arnoldarts DOT de> wrote on 09/28/2011 11:20:57 AM:
>
> > > 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>
...
> > 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>
>
> Yeah, that's great if you update the locate database (as you mention).  On
> a backup server, with millions of files and lots of work to do pretty much
> around the clock?  That's one of the first things I disable!  So no
> locate.

Hmmm.

When I want to search for a file (half the time I don't even know what
machine or from what time period, so I have to search the entire pool), I
look at the mounted backuppcfs fuse filesystem (I mount onto /snapshots):
https://svn.ulyssis.org/repos/sipa/backuppc-fuse/backuppcfs.pl

What if you let mlocate index into the /snapshots ?

I haven't tested to get it to index /snapshots, but mlocate doesn't index
into directories that haven't had a modified mtime.  If backuppfs
correctly preserves mtimes for directories, then updatedb.mlocate will do
the right thing and be a lot quicker than regular old updatedb.  Then make
sure that cron runs it at a time appropriate for you (when I was doing
night shift, this *wasn't* at 4am!), and you won't even notice that it's
busy.

Then wrap locate up in a simple cgi script to present to your users
instead of training them how to use locate on the commandline.

-- 
Tim Connors

------------------------------------------------------------------------------
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/