On 09/15/14 10:27, Luc Van der Veken wrote: > From: Bill Arlofski [mailto:waa-bac...@revpol.com] >> 1. From a shell prompt: bacula-dir -t -c /path/to/bacula-dir.conf > > > The documentation seems to agree with you, but I once found another command > somewhere (don't remember exactly where), with just the -v switch. > > So the reload script I created to check & reload without having to enter the > full details looks like this (there are three lines if wrapping should occur, > # prepended to 2nd and 3rd line for safety): > > #!/bin/sh > # bacula-dir -v /etc/bacula/bacula-dir.conf > # [ $? -eq 0 ] && service bacula-director reload || echo Config error found, > NOT reloading. > > > It seems to work as intended, with good as well as with bad config files. > Is it really trying to start another instance of bacula-dir, or was I using > some undocumented feature without realizing? > > > When I add a -t switch, with or without -c, I get 4 or 5 lines of output > about orphaned buffers. > With only -v, I don't get those, but I *do* get the correct exit code to > indicate OK or bad config.
Hi Luc I actually like the idea of a short shell script, as long as the Distributions "service .. reload" command issues a reload to bacula, and does not restart the bacula-dir daemon. Something to verify by checking the init script :) Other option, to avoid any distro-specific init file oddities is: (this will wrap, assume one line) [ $? -eq 0 ] && echo "reload" | bconsole -c /path/to/bconsole.conf || echo Config error found, NOT reloading. Also, on v7.0.4, # bacula-dir -h shows that -v is "verbose user messages" so I do not see how that also, and only checks the config file for proper syntax - unless it is an undocumented feature. The -c is not necessary if your configs are in the default that the bacula binaries are compiled for. I keep mine in a non-standard directory, so I always specify -c, even when assisting others. Also, then I run: bacula-dir -v /path/to/bacula-dir.conf or bacula-dir -t -c /path/to/bacula-dir.conf or bacula-dir -v -t -c /path/to/bacula-dir.conf (with a known good bacula-dir.conf) Each gives no output (this is a v7.0.4 Bacula install on Gentoo Linux), so I am not sure why you would get the "orphaned buffer" messages you mentioned. Bill -- Bill Arlofski Reverse Polarity, LLC http://www.revpol.com/ -- Not responsible for anything below this line -- ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users