Bob Hetzel wrote:
> Folks,
>
> I've got a user who thinks a file was deleted but she isn't sure of the
> exact name or where it was in the file system. Is there a command to
> search for a file with wildcards which could be anywhere in the catalog
> (where both the date it was backed up and the directory it lived in are
> not known)?
>
> Barring that, what might the syntax of a mysql select command to do it?
>
> Bob
>
A query ( choose sqlquery in bconsole ) or directly against the db
Insipired from the /usr/lib/bacula/query.sql choice 1
something like that
SELECT DISTINCT Job.JobId as JobId, Client.Name as Client,
Path.Path,Filename.Name,StartTime,Level,JobFiles,JobBytes FROM
Client,Job,File,Filename,Path WHERE Client.ClientId=Job.ClientId AND
JobStatus='T' AND Job.JobId=File.JobId AND
Path.PathId=File.PathId AND Filename.FilenameId=File.FilenameId AND
Filename.Name LIKE '%FIND ME%' ORDER BY Job.StartTime
LIMIT 100;
for mysql ... you could adjust if you use postgresql.
--
Bruno Friedmann
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|