|
From: Phil S. <ph...@ca...> - 2023-10-02 17:57:21
|
On 10/2/23 13:39, Rob Gerber wrote: > I'm not sure, but maybe you'll need to query your database directly > instead of relying on Bacula to simplify that process. *This is not an > educated answer, just my novice guess.* > > I see bacula bconsole has a 'query' command that I believe passes SQL > query language commands on to the relevant DB server. Might want to look > into that, possibly in the bacula console operators manual. I've used > the PDF copy of the documentation because it's easier to search. I'd swear there used to be a 'blist' tool, but I can't for the life of me find it any more. This query will list files in a given Job: SELECT CONCAT(p.Path, f.Filename) FROM File f JOIN Path p ON f.PathId = p.PathId WHERE f.JobId = <job id>; If you want only, say .odt files, you could use: SELECT CONCAT(p.Path, f.Filename) FROM File f JOIN Path p ON f.PathId = p.PathId WHERE f.JobId = <job id> AND f.Filename LIKE '%.odt'; For example: MySQL 127.0.0.1> SELECT CONCAT(p.Path, f.Filename) FROM File f JOIN Path p ON f.PathId = p.PathId WHERE f.JobId = 836 AND f.Filename LIKE '%.odt'; +--------------------------------------------------+ | CONCAT(p.Path, f.Filename) | +--------------------------------------------------+ | /home/alaric/Documents/Writing/Bearing Gifts.odt | | /home/alaric/Documents/Writing/United Fleet.odt | +--------------------------------------------------+ 2 rows in set (0.647 sec) You can get the LStat field as well, but you'd have to decode it yourself. I don't remember offhand how LStat is encoded. -- Phil Stracchino Babylon Communications ph...@ca... ph...@co... Landline: +1.603.293.8485 Mobile: +1.603.998.6958 |