Re: needed tapes

"Gary R. Schmidt" <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <[email protected]>
On 16/3/25 08:48, Bill Arlofski wrote:
> On Friday, March 14th, 2025 at 21:27, Gary R. Schmidt <[email protected]> wrote:
> 
>> On 15/3/25 01:24, Bill Arlofski via Bacula-users wrote:
>>
> 
>>> On 3/14/25 5:22 AM, Gary R. Schmidt wrote:
>>>
> 
>>>> As a cronjob I'd put "echo query 22 | bconsole" in a file and execute
>>>> that.
>>>>
> 
>>>> Cheers,
>>>> Gary B-)
>>>
> 
>>> This will not work. :)
>>
> 
>> Works perfectly for me:
>> $ echo "echo query 22 | bconsole" > fred.sh
>>
> 
>> $ chmod a+x fred.sh
>> $ ./fred.sh
>> Connecting to Director MY_DIRECTOR:9101
>> 1000 OK: 103 MY_DIRECTOR-dir Version: 9.4.2 (04 February 2019)
>> Enter a period to cancel a command.
>> query 22
>> Automatically selected Catalog: MyCatalog
>> Using Catalog "MyCatalog"
> 
> Hello Gary,
> 
> Your method will not work for any queries that ask for input.
> 
> I have a custom query.sql, and option 22 in mine requires manual input because it asks for a pool or volume name - or something, I can't recall in this moment.
> 
Mine's custom as well, and in it query 22 is my little bit of SQL.  :-)

> This is what triggered my unwavering "this will not work" comment. :)
> 
> Although, I must admit, I didn't think the bconsole query command would accept anything on the command line - I still learn something new every day I guess, even after 20+ years of using Bacula. :)
> 
Yep, all the time.

	Cheers,
		Gary	B-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.