Resource Category
There are separate resources for each of the Bacula components, Director, File daemon, and the Storage daemon.
Although these resources can be obtained dynamically from the Director
or any other component with the show
command, the examples given
below are obtained by executing the appropriate Bacula json
program
that reads the Bacula configuration file and returns the JSON output
shown below. The programs are named bdirjson
, bfdjson
, and
bsdjson
. When no options are given to each of those programs they
simply list the full Bacula conf file in JSON format. They also have a
series of options that permit obtaining individual resources.
Please note that if you have updated the bacula-dir.conf file, but have not restarted the Director or done a reload command, the information that is returned to you will not correspond to that which the Director is using. Likewise if you have update bacula-fd.conf or bacula-sd.conf and have not restarted the appropriate File daemon or Storage daemon, the information you get from the REST-API will not correspond to what the particular daemon is using.
Director Resource Category
The <category> res
for the Director may have any of the following
values:
director
client
job
storage
catalog
schedule
fileset
pool
messages
counter
console
jobdefs
device
autochanger
File Daemon Resource Category
The <category> res for the File daemon may have any of the following values:
director
filedaemon
messages
client
Storage Daemon Resource Category
The <category> res
for the Storage daemon may have any of the
following values:
director
storage
device
messages
autochanger
bconsole and bat Resource Category
The <category> res for the bconsole and bat programs may have any of the following values:
console
director
Director Director Resource Category
The following output is similar to what would be output from:
/opt/bacula/bin/bdirjson -r Director -D
[
{
"Name": "rufus-dir",
"Messages": "Standard",
"DirPort": 8101,
"QueryFile": "/opt/bacula/bin/query.sql",
"WorkingDirectory": "/opt/bacula/working",
"PluginDirectory": "/opt/bacula/bin",
"PidDirectory": "/opt/bacula/working",
"SubsysDirectory": "/opt/bacula/working",
"MaximumConcurrentJobs": 4,
"Password": "my-password",
"HeartbeatInterval": 330
}
]
Resource Client Input Examples
/res/director/?resource=Client - returns the name of all clients in resources
/res/director/?option=value - see the table below
Client Resource Options
- Director Client Resource Output
- Director Job Resource Output
- Director Storage Resource Output
- Director Catalog Resource Output
- Director Schedule Resource Output
- Director FileSet Resource Output
- Director Pool Resource Output
- Director Messages Resource Output
- Director JobDefs Resource Output
- Client Director Resource Output
- Client Client Resource Output
- Client Messages Resource Output
- Storage Director Resource Output
- Storage Storage Resource Output
- Storage Device Resource Output
- Storage Messages Resource Output
See also
Go back to:
Go to:
Go back to the REST API chapter.
Go back to the main Advanced Features Usage page.