On Fri, 26 Apr 2002 at 2:58pm, Niall O Broin wrote

> I asked a while ago about locating a file backed up by amanda and I was
> pointed to the index directory and sure enough in 
> 
> indexdir / client / disk
> 
> you find a bunch of gzipped index files named date_level.gz which is fine.
> However, how do I map them to backups and tapes ? I want to try to write
> some kind of a frontend so that I when some poor luser says "I've lost
> VeryImportantDocument.pdf" I can type something like
> 
> amanda_locate VeryImportantDocument.pdf
> 
> and I'll get a listing of any backups I should have of that file, where they
> were from, when they were made, and what tape they're on so that I can
> insert the right tape and get the file back with amrecover. amrecover on its
> own doesn't quite do the trick because it only gives me an FTP like browser,
> so I can't e.g. find a file without knowing what directory it was in.

find $INDEXDIR -name \*.gz | xargs zgrep -H VeryImportantDocument.pdf

This will get you all the dates on which the file was backed up and, more 
importantly, the directory in which it resides.  Armed with that last bit 
of information, you can use amrecover, cd to the right directory, and let 
amrecover tell you what tape it wants.

-- 
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University

Reply via email to