Configure Category
This conf
category enables to configure the Bacula configuration
resources via the Bacula REST API interface. Before using it, it is
required to install and configure the BWeb Management Suite.
Note
The conf
category can be used only when the OAuth2 authorization is
enabled.
You must configure the BConfig URI
, the web auth option the
BConfig User
and the BConfig Password
. These fields are
highlighted by the red arrows on the screen shot below.
In general, the conf
category request format consists in four items:
component type (director, storage, filedaemon, console),
component name (ex. mydirector-dir, storage-sd …etc.),
resource type (ex. job, client, pool, storage …etc.),
resource name (ex. MyJob123, FavClient …etc.).
The conf
category request has the following form:
/conf/<component_type>/<component_name>/<resource_type>/<resource_name>/
There are two conf
request methods available:
PUT
method to update resource configuration. If resource doesn’t exist it is created.DELETE
method to delete resource.
Example request to update configuration job “MyJob”:
PUT /conf/director/mysystem-dir/job/MyJob/
{
"Name": "MyJob",
"Type": "Backup",
"Client": "MyClient",
"Fileset": "MyFileset",
"Pool": "MyPool",
"Schedule": "MySchedule",
"Storage": "MyStorage",
"Messages": "MyMessages"
}
Example request to delete job “MyJob” configuration:
DELETE /conf/director/mysystem-dir/job/MyJob/
After changing configuration it can be useful to commit these changes in the BWeb workset by the following request:
DELETE /conf/director/mysystem-dir/job/MyJob/
with POST param:
commit=1
It is also possible to reload the Bacula Director by:
GET /restart?reload_dir=1
or restart a component by:
GET /restart?restart_dir=1
GET /restart?restart_sd=1
GET /restart?restart_fd=1
See also
Go back to:
Go to:
Go back to the REST API chapter.
Go back to the main Advanced Features Usage page.