On 16/08/10, Eric Bollengier (eric.bolleng...@baculasystems.com) wrote: > Hi Rory, > > I think that what you try to implement already exists and is called "bscan" > and "bls". Take a look to the manual for more information on how to use them. > > For more information on how Bacula internally works (like file index or md5), > feel free to read the developers manual and of course, the source code > himself.
I am aware of the utilities and how they work. The point is to try and avoid having people use them when I can provide the necessary information. My main question is: How can I prepare information to allow people to most conveniently extract data from Bacula backup tapes a long time in the future? My second question is: How can I list which files are on a tape, as jobmedia.firstindex and jobmedia.lastindex appear to be per-backup indexes and not foreign keys to the file table. Is there another way of relating directly between file and media? Rory > On Monday 16 August 2010 12:22:37 Rory Campbell-Lange wrote: > > Dear Developers > > > > I have been receiving a lot of help from the Bacula-users list. However > > there is one subject to which I haven't had any responses and I would be > > grateful for your help. > > > > I wish to create information to accompany each LT04 tape set I produce > > on behalf of each of our clients. This is so that others can work out > > how to retrieve information off the tapes in future. > > > > I intend to produce the following files on CD or DVD to accompany each > > tape set: > > > > * a text file with general information about the file set and Bacula > > and the bextract utility. > > * a Bacula bootstrap file for the tape set > > * a text file dump of elements of the Catalog > > > > For this last item I wish to include the tape number on which each > > listed file is included. (This is useful also for our auditing procedure > > where we wish to pull back a file from each tape.) > > > > However I cannot find how to do an SQL JOIN between Media and File and > > JobMedia.FirstIndex (for instance) does not appear to point to > > File.FileID. > > > > Can someone point me to the relationship between Media and File? > > > > Thanks > > Rory > > > > p.s. My query so far is > > > > SELECT > > j.jobid, j.name AS jobname, jmlj.volumename, jmlj.slot, f.fileid, > > p.path, fn.name AS filename, f.md5 > > FROM > > job j, > > filename fn, > > path p, > > file f > > LEFT JOIN > > ( SELECT > > jj.jobid, jj.mediaid, m.volumename, > > m.slot, jj.firstindex, jj.lastindex > > FROM > > jobmedia jj, media m > > WHERE > > jj.mediaid = m.mediaid > > ) jmlj ON > > jmlj.jobid = f.jobid > > AND > > f.fileid >= jmlj.firstindex -- wrong! > > AND > > f.fileid <= jmlj.lastindex -- wrong! > > WHERE > > f.jobid = j.jobid > > AND > > f.pathid = p.pathid > > AND > > f.filenameid = fn.filenameid; -- Rory Campbell-Lange r...@campbell-lange.net Campbell-Lange Workshop www.campbell-lange.net 0207 6311 555 3 Tottenham Street London W1T 2AF Registered in England No. 04551928 ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel