Bacula-users

Re: [Bacula-users] Parser error while reloading after adding new client

2014-08-11 10:25:04
Subject: Re: [Bacula-users] Parser error while reloading after adding new client
From: "Clark, Patricia A." <clarkpa AT ornl DOT gov>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 11 Aug 2014 14:22:56 +0000
I think you are over working your include line.  This one works for me, you may 
need to adjust for your path(s):

@|"sh -c 'for f in /etc/bacula/clients.d/*.conf ; do echo @${f} ; done'"

Patti Clark
Linux System Administrator
R&D Systems Support Oak Ridge National Laboratory

From: Shorty Markus Uckelmann <shorty AT koeln DOT de<mailto:shorty AT koeln 
DOT de>>
Date: Monday, August 11, 2014 at 9:58 AM
To: "bacula-users AT lists.sourceforge DOT net<mailto:bacula-users AT 
lists.sourceforge DOT net>" <bacula-users AT lists.sourceforge DOT 
net<mailto:bacula-users AT lists.sourceforge DOT net>>
Subject: Re: [Bacula-users] Parser error while reloading after adding new client

On 11.08.2014 12:31, Markus "Shorty" Uckelmann wrote:
I wanted to add a new client and after a reload (echo "reload" |
/usr/sbin/bconsole) the following error popped up:
11-Aug 10:47 bacula-dir: ERROR in parse_conf.c:938 Config error:
Expected a Resource name identifier, got: find: : line 1, col 5 of
file |find /etc/bacula/conf.d/clients -name '*.conf' -type f -exec
echo @{} ; find: Failed to change directory: Permission denied
11-Aug 10:47 bacula-sto1-dir JobId 0: Error: Please correct
configuration file: /etc/bacula/bacula-dir.conf 11-Aug 10:47
bacula-sto1-dir JobId 0: Error: Resetting previous configuration.

I forgot to post the line of the configuration file:

/etc/bacula/bacula-dir.conf:
[...]
# client definitions
@|"find /etc/bacula/conf.d/clients -name '*.conf' -type f -exec echo
@{} \;"

I haven't put it there. That was before my time. But I guess my
predecessor stumble over it here
http://wiki.bacula.org/doku.php?id=sample_configs

There it says:

Since Bacula 2.2.0 you can include the output of a command within a
configuration file with the "@|" syntax. Here's how you can use "@|"
to include all files within some directory without explicitly naming
the files (this lets you, say, add new clients to a configuration
without changing existing configuration files, just by adding a file
for the new client, containing its Job, Client, and FileSet resources,
to the included directory):

#
# Include subfiles associated with configuration of clients.
# They define the bulk of the Clients, Jobs, and FileSets.
# Remember to "reload" the Director after adding a client file.
#
@|"find /etc/bacula/clientdefs -name '*.conf' -type f -exec echo @{} \;"


Thx, Shorty

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net<mailto:Bacula-users AT 
lists.sourceforge DOT net>
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
_______________________________________________
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>