Re: needed tapes

Bill Arlofski via Bacula-users <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <Nhw-RiJXNtfapqtgwN-XfZmazXJMgXku2eEmTJJD5IqzKKz_itobK9bmwTMJ7TG07iO69OhSomgSav1DWU9hvPvKYTP7Zg_NIO1kZI4_K8U=@protonmail.com>
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.

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. :)


Best regards,
Bill

_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
signature.asc (application/pgp-signature, 603 B)
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wsC5BAEBCgBtBYJn1fWhCZBIDTDab9XDQEUUAAAAAAAcACBzYWx0QG5vdGF0
aW9ucy5vcGVucGdwanMub3Jn9FAOLAun7fSpc4Dih7JEgW+Ci/0Mj0YtGCSs
lTuPyF4WIQTLi55QWkkIrklG2+lIDTDab9XDQAAAW90H+wVNaNgBYh0u2QDg
D875vBRwpeA2//ZJFKRcYQjNgnu+m6Skm5KCkziMrp81Dc8HcnJwEnlFy8zV
vM2Z+R73F9oCIntYC4GsMFyVhZk5s+2Z5kMBAfbW3KBzRxmRCBgYOOJkENmS
wvpvcu4Cjrq82zfh/AJqqc2B6cYXAGuqj9XXVrgW3Q69C29yI5QpjxTNg81l
JOQsMepc46BSsWsM8eaJ1ocTLc+bNRHWxWCp7LbJjW1cO9ceSCiqZi7aH+EZ
EN3RtbQJ9J2isV2WuQTdr+FoEm5AP7fOOYDGxfuJCLeQG/CDkl5UTlNuIbgJ
ZDucqDC3wZMMvo0SgVtxO08sygo=
=xiwn
-----END PGP SIGNATURE-----
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.