In the message dated: Wed, 17 Jan 2007 18:51:58 GMT,
The pithy ruminations from Alan Brown on
<Re: [Bacula-users] correction to query.sql #3 (v1.38.11)> were:
=> On Wed, 17 Jan 2007 [EMAIL PROTECTED] wrote:
=>
=> >
=> > I noticed an error in the $BACULA/bin/query.sql query #3, which is
supposed to
=> > list the last 20 full backups for a client.
=>
=> I'd noticed this too, but hadn't gotten round to trying to fix it.
=>
=> Your fix works for me, but shows up a lack of Job.Name in the output.
Hmmm... I'm not sure about the benefit to having the Job.Name...
=>
=> >For all I know, this has already been
=> > corrected in the latest bacula release.
=>
=> It hasn't.
OK.
=>
=> > The diff being:
=> > #######################################################################
=> > --- query.sql 2007-01-17 12:01:25.000000000 -0500
=> > +++ query.sql-fixed 2007-01-17 12:01:36.000000000 -0500
=> > @@ -29,7 +29,7 @@
=> > :List last 20 Full Backups for a Client
=> > *Enter Client name:
=> > SELECT DISTINCT Job.JobId,Client.Name AS
Client,StartTime,JobFiles,JobBytes,
=> > - JobMedia.StartFile as VolFile,VolumeName
=> > + VolumeName
=> > FROM Client,Job,JobMedia,Media
=> > WHERE Client.Name='%1'
=> > AND Client.ClientId=Job.ClientId
=> > ########################################################################
=>
=> I'd suggest this as well
=>
=> - SELECT DISTINCT Job.JobId,Client.Name AS
Client,StartTime,JobFiles,JobBytes,
=> + SELECT DISTINCT Job.JobId,Job.Name,StartTime,JobFiles,JobBytes,
Yes, I can see how having the Job.Name would be useful (especially for the
bacula-dir server, as the catalog backup is considered a "Full" backup).
=>
=> IMO There's not much point showing the client name as it's just been
=> explicitly specified and you can't script "query" commands.
Huh? I script query commands all the time--in fact, as part of the post-catalog
backup, I've got shell and perl scripts that run about 5 queries nightly,
reporting on things like what tapes need to be changed, what tapes are
available to load, etc. I could certainly see scripting reports that query the
most recent backups for a long list of servers, such as:
foreach $client (alpha-fd, beta-fd, gamma-fd)
do
echo "query\n3\n$client\nquit\n" | bconsole -f
/etc/bconsole.conf | \
grep "^|"
done
in which case, I would want the client name on each line of the output.
Mark
=>
=> YMMV
=>
=>
=>
----
Mark Bergman [EMAIL PROTECTED]
System Administrator
Section of Biomedical Image Analysis 215-662-7310
Department of Radiology, University of Pennsylvania
http://pgpkeys.pca.dfn.de:11371/pks/lookup?search=mark.bergman%40.uphs.upenn.edu
The information contained in this e-mail message is intended only for the
personal and confidential use of the recipient(s) named above. If the reader of
this message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified that you have
received this document in error and that any review, dissemination,
distribution, or copying of this message is strictly prohibited. If you have
received this communication in error, please notify us immediately by e-mail,
and delete the original message.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users