0

I often need to find a file in bacula catalog to restore, but don't know the path or the jobid it was backed up in, nor the full name of the file, just a portion of the name. Optimal solution would be an sql search in bacula catalog. I tried all versions of mysql queries inside bconole using sqlquery command of the form:

SELECT FROM Filename WHERE Name LIKE '%filename_portion%';

but get error on the syntaxis of sql command... Any suggestions of the correct sql query format for the task?

thanks Anton

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
user1354209
  • 1
  • 1
  • 1

1 Answers1

2

You need to select something in the select statement. For the filename:

SELECT Filename FROM Filename WHERE Name LIKE '%filename_portion%';

For the entire record:

SELECT * FROM Filename WHERE Name LIKE '%filename_portion%';
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786