it will pipe the bootstrap record. It could for example be a shell
script that emails you the bootstrap record.
- On versions 1.39.22 or greater, before opening the file or execute the
+ On versions 1.39.22 or greater, before opening the file or executing the
specified command, Bacula performs
\ilink{character substitution}{character substitution} like in RunScript
directive. To automatically manage your bootstrap files, you can use
\index[dir]{RunScript}
\index[dir]{Directive!Run Script}
- This directive is only implemented in version 1.39.22 and later.
- The RunScript directive behaves more like a resource in that it
+ This directive is implemented in version 1.39.22 and later.
+ The RunScript directive behaves like a resource in that it
requires opening and closing braces around a number of directives
that make up the body of the runscript.
Bacula job report. The command string must be a valid program name or name
of a shell script.
- In addition, the command string is parsed then fed to the execvp() function,
+ In addition, the command string is parsed then fed to the OS,
which means that the path will be searched to execute your specified
command, but there is no shell interpretation, as a consequence, if you
invoke complicated commands or want any shell features such as redirection
{\bf Special Windows Considerations}
In addition, for a Windows client on version 1.33 and above, please take
- careful note that you must ensure a correct path to your script. The
- script or program can be a .com, .exe or a .bat file. However, if you
- specify a path, you must also specify the full extension. Unix like
- commands will not work unless you have installed and properly configured
- Cygwin in addition to and separately from Bacula.
-
+ note that you must ensure a correct path to your script. The script or
+ program can be a .com, .exe or a .bat file. If you just put the program
+ name in then Bacula will search using the same rules that cmd.exe uses
+ (current directory, Bacula bin directory, and PATH). It will even try the
+ different extensions in the same order as cmd.exe.
The command can be anything that cmd.exe or command.com will recognize
- as an executable file. Specifying the executable's extension is
- optional, unless there is an ambiguity. (i.e. ls.bat, ls.exe)
+ as an executable file.
+
+ However, if you have slashes in the program name then Bacula figures you
+ are fully specifying the name, so you must also explicitly add the three
+ character extension.
+
+ The command is run in a Win32 environment, so Unix like commands will not
+ work unless you have installed and properly configured Cygwin in addition
+ to and separately from Bacula.
The System \%Path\% will be searched for the command. (under the
environment variable dialog you have have both System Environment and
available to bacula-fd, if it is running as a service.)
System environment variables can be referenced with \%var\% and
- used as either part of the command name or arguments.
+ used as either part of the command name or arguments.
+
+ So if you have a script in the Bacula\\bin directory then the following lines
+ should work fine:
+\footnotesize
+\begin{verbatim}
+ Client Run Before Job = systemstate
+or
+ Client Run Before Job = systemstate.bat
+or
+ Client Run Before Job = "systemstate"
+or
+ Client Run Before Job = "systemstate.bat"
+or
+ ClientRunBeforeJob = "\"C:/Program Files/Bacula/systemstate.bat\""
+\end{verbatim}
+\normalsize
+
+The outer set of quotes is removed when the configuration file is parsed.
+You need to escape the inner quotes so that they are there when the code
+that parses the command line for execution runs so it can tell what the
+program name is.
+
\footnotesize
\begin{verbatim}
For Win32, please note that there are certain limitations:
-
ClientRunBeforeJob = "C:/Program Files/Bacula/bin/pre-exec.bat"
Lines like the above do not work because there are limitations of
be rescheduled. The default is {\bf no} (i.e. the job will not be
rescheduled).
-
This specification can be useful for portables, laptops, or other
machines that are not always connected to the network or switched on.
\index[fd]{Client (or FileDaemon)}
\index[fd]{Directive!Client (or FileDaemon)}
Start of the Client records. There must be one and only one Client resource
-in the configuration file, since it defines the properties of the current
-client program.
+ in the configuration file, since it defines the properties of the current
+ client program.
\item [Name = \lt{}name\gt{}]
\index[fd]{Name}
\index[fd]{FDPort}
\index[fd]{Directive!FDPort}
This specifies the port number on which the Client listens for Director
-connections. It must agree with the FDPort specified in the Client resource
-of the Director's configuration file. The default is 9102.
+ connections. It must agree with the FDPort specified in the Client resource
+ of the Director's configuration file. The default is 9102.
\item [FDAddress = \lt{}IP-Address\gt{}]
\index[fd]{FDAddress}
\index[fd]{Directive!FDAddress}
This record is optional, and if it is specified, it will cause the File
-daemon server (for Director connections) to bind to the specified {\bf
-IP-Address}, which is either a domain name or an IP address specified as a
-dotted quadruple. If this record is not specified, the File daemon will bind
-to any available address (the default).
+ daemon server (for Director connections) to bind to the specified {\bf
+ IP-Address}, which is either a domain name or an IP address specified as a
+ dotted quadruple. If this record is not specified, the File daemon will bind
+ to any available address (the default).
\item [SDConnectTimeout = \lt{}time-interval\gt{}]
\index[fd]{SDConnectTimeout}
\index[fd]{Directive!SDConnectTimeout}
This record defines an interval of time that the File daemon will try to
-connect to the Storage daemon. The default is 30 minutes. If no connection
-is made in the specified time interval, the File daemon cancels the Job.
+ connect to the Storage daemon. The default is 30 minutes. If no connection
+ is made in the specified time interval, the File daemon cancels the Job.
\item [Maximum Network Buffer Size = \lt{}bytes\gt{}]
\index[fd]{Maximum Network Buffer Size}
\index[fd]{Directive!Maximum Network Buffer Size}
where \lt{}bytes\gt{} specifies the initial network buffer size to use with
-the File daemon. This size will be adjusted down if it is too large until it
-is accepted by the OS. Please use care in setting this value since if it is
-too large, it will be trimmed by 512 bytes until the OS is happy, which may
-require a large number of system calls. The default value is 32,768 bytes.
+ the File daemon. This size will be adjusted down if it is too large until it
+ is accepted by the OS. Please use care in setting this value since if it is
+ too large, it will be trimmed by 512 bytes until the OS is happy, which may
+ require a large number of system calls. The default value is 65,536 bytes.
+
+ Note, on certain Windows machines, there are reports that the
+ transfer rates are very slow and this seems to be related to
+ the default 65,536 size. On systems where the transfer rates
+ seem abnormally slow compared to other systems, you might try
+ setting the Maximum Network Buffer Size to 32,768 in both the
+ File daemon and in the Storage daemon.
\end{description}
The following is an example of a valid Client resource definition:
\index[fd]{Director}
\index[fd]{Directive!Director}
Start of the Director records. There may be any number of Director resources
-in the Client configuration file. Each one specifies a Director that is
-allowed to connect to this Client.
+ in the Client configuration file. Each one specifies a Director that is
+ allowed to connect to this Client.
\item [Name = \lt{}name\gt{}]
\index[fd]{Name}
\index[fd]{Directive!Name}
The name of the Director that may contact this Client. This name must be the
-same as the name specified on the Director resource in the Director's
-configuration file. Note, the case (upper/lower) of the characters in
-the name are significant (i.e. S is not the same as s). This directive
-is required.
+ same as the name specified on the Director resource in the Director's
+ configuration file. Note, the case (upper/lower) of the characters in
+ the name are significant (i.e. S is not the same as s). This directive
+ is required.
\item [Password = \lt{}password\gt{}]
\index[fd]{Password}
\index[fd]{Monitor}
\index[fd]{Directive!Monitor}
If Monitor is set to {\bf no} (default), this director will have full access
-to this Client. If Monitor is set to {\bf yes}, this director will only be
-able to fetch the current status of this Client.
+ to this Client. If Monitor is set to {\bf yes}, this director will only be
+ able to fetch the current status of this Client.
-Please note that if this director is being used by a Monitor, we highly
-recommend to set this directive to {\bf yes} to avoid serious security
-problems.
+ Please note that if this director is being used by a Monitor, we highly
+ recommend to set this directive to {\bf yes} to avoid serious security
+ problems.
\end{description}
Thus multiple Directors may be authorized to use this Client's services. Each