Amanda-Users

Re: Searching for a particular file....

2006-09-13 19:05:30
Subject: Re: Searching for a particular file....
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda users list <amanda-users AT amanda DOT org>
Date: Wed, 13 Sep 2006 17:56:26 -0400
On Wed, Sep 13, 2006 at 04:25:56PM -0400, Guy Dallaire wrote:
> Using amanda 2.4.5 with gnu-tar.
> 
> This has probably been already answered somewhere but I can't find an answer
> in the list or the wiki....
> 
> Is there a way to list the content of an amanda tape (without having to load
> and read the tape) ?
> 
> Someone has lost a file, and he does not know on which host and on which
> disk it was.
> 
> Is there a way to list the content of each tape (index?) and grep for some
> file pattern ?
> 
> ex: find all files ending with ".dmp" and list the tape name and the DLE
> where I could find it so I can then use amrecover and know where to begin.
> 

cd $(amgetconf <config> indexdir)

you'll find a set of hostname dirs,
under that, DLEname dirs

In the DLEname dirs are the indexes by date.
The indexes have one filename per line.

They are gzipped, so if you have the "gzgrep"
command they are easy to look at.  Just a little
more work otherwise.

So after the above cd, you could do a

gzgrep '\.dmp$' */*/*

And sit back.  Of course, if you have a lot of
hosts/DLEs/saved dumps, you might exceed the
maximum command line length.  So it might take
a few greps :)

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>