On 06/11/2012 04:51 PM, Domen Kožar wrote: > You will have to write an SQL query that does the following: > > - selects all jobs from the client that you are interested in > - filter by path where backup was stored > - generate path/filenames for all jobs (they are base64 encoded) > - with programming language filter results by *flyer*
Or, you could do something like the following: mysql> select * from Filename where Name like '%flyer%'; You *REALLY* want to do this as a search on a single table, NOT part of a join, because your filename fragment both begins and ends with a wildcard, and therefore your DB cannot use an index to search for it, which means it's going to force a full table scan. You want that full table scan to happen on a single table, not on a join of five tables. Once you have identified a likely filename, do something like this: mysql> select File.FileId, Path.Path, Filename.Name, Client.Name, Job.JobId from File join Filename on File.FilenameId = Filename.FilenameId join Path on File.PathId = Path.PathId join Job on Job.JobId = File.JobId join Client on Job.ClientId = Client.ClientId where Filename.Name = 'your filename here'; This will give you the name of the client, the job ID it was backed up in, and where on that client it is located. -- Phil Stracchino, CDK#2 DoD#299792458 ICBM: 43.5607, -71.355 ala...@caerllewys.net ala...@metrocast.net p...@co.ordinate.org Renaissance Man, Unix ronin, Perl hacker, SQL wrangler, Free Stater It's not the years, it's the mileage. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users