Bacula-users

Re: [Bacula-users] running the bconsole query command from command line

2008-10-04 16:21:29
Subject: Re: [Bacula-users] running the bconsole query command from command line
From: Ryan Novosielski <novosirj AT umdnj DOT edu>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 01 Oct 2008 01:01:11 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don't really understand your problem, but I can give you an example of
what I do for my query that finds old volumes that runs via cron (it
runs "query", hits enter, and then types in 16 for the right query --
you'd use 8 I guess.

# Warn tape operators of impending tape failure
0 8 * * 1       echo "query\n16" | /usr/local/bacula/sbin/bconsole -c
/usr/local/bacula/etc/bconsole.conf | /usr/xpg4/bin/grep -e "|" -e "+" |
mailx -s "WARNING: Tapes nearing end-of-life" -r bacula@host -c
email AT example DOT com

Hope this helps.

Jean-Yves Boisiaud wrote:
> Hello,
> 
> I'm using bacula 2.4.2.
> 
> I would like to run the 'query' command of bconsole (and more precisely 
> item 8: List Volumes to Restore All Files) from a shell script.
> 
> How could I do ?
> 
> I also tried to use the sqlquery command and the SQL instructions 
> provided with the Bacula software. Somewhere in these SQL instructions, 
> I replaced %1 with the real client name. Except bconsole commands like 
> 'Add to SQL query: ...' and friends, nothing usefull was displayed, ie 
> the following array was not displayed :
> +------------+
> | VolumeName |
> +------------+
> | full-0001  |
> | incr-0004  |
> | diff-0006  |
> | incr-0005  |
> +------------+
> 
> Thanks for your help
> 
> J-Yves
> 
> -------------------------------------------------------------------------
> 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


- --
 ---- _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
 |$&| |__| |  | |__/ | \| _| |novosirj AT umdnj DOT edu - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI4wQWmb+gadEcsb4RAj8PAJ47U5zHzrwfMSEfOfyanDrLVglZFgCfYNiB
i32ahwHiZKkHq0URbx0YzL8=
=aNSl
-----END PGP SIGNATURE-----

Attachment: novosirj.vcf
Description: Vcard

-------------------------------------------------------------------------
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
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] running the bconsole query command from command line, Ryan Novosielski <=