bconsole Query Commands
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
The Bacula Enterprise OpenStack Plugin supports the bconsole query command.
Bacula queries the OpenStack API and receives answers in the form of
key=value pairs. The OpenStack Plugin supports two query
parameters.
parameter=connection
When using parameter=connection, the query command sends a request across various OpenStack services to check whether the current plugin parameters allow
the connection to each one of the service endpoints. The example below shows the execution of a correctly formatted CONNECTION query and response:
*.query plugin="openstack: OS_AUTH_URL=http://localhost:5000/v3 OS_USERNAME=admin OS_PASSWORD=123456 OS_USER_DOMAIN_NAME=Default OS_PROJECT_NAME=admin" client=bacula_proxy-fd parameter=connection
connection=ok
keystone=ok
cinder=ok
glance=ok
neutron=ok
nova=ok
When the query parameter is connection, each service will return a value that is either ok or not ok, indicating whether the
connection was successful or not. An additional tuple connection= is reported at the end of the query result to indicate if all the other connections are successful.
parameter=server
When the query parameter is server, the query command sends a request to the OpenStack API to list all available Nova servers and their respective UUID.
This query displays two key=value tuples per server, where:
the first
keyis theserverkeyword and thevalueis the name of the Nova server.the second
keyis theuuidkeyword and thevalueis the Nova server UUID.
The example below shows the execution of a correctly formatted server query that finds six different guest servers.
This query also check if the proxy_server value is correctly set.
*.query plugin="openstack: proxy_server=bacula_proxy" client=bacula_proxy-fd parameter=server
server=nfs-1
uuid=b12e3313-7c3e-4757-8a12-5a2c9884ad53
server=nfs-i
uuid=7629a85d-3bec-4734-8d35-586e8ba1253f
server=nfs-2
uuid=729ae7cb-0103-4ddd-8f23-5dfab6a00c0c
server=www-1
uuid=248dd682-f0e9-43c1-8c05-999115459e1a
server=www-2
uuid=727e0dbf-9d68-4f83-97b8-d3540133b4fc
server=bacula-proxy
uuid=3b8496f0-740c-41d1-8a08-8c1a50cae461
Note
The above query command is using authentication from /opt/bacula/etc/openstack.conf.
parameter=proxy_server
When using proxy_server, the query command sends a request to the OpenStack API to list all eligible candidates to the role of proxy server.
This query displays two key=value tuples per candidate where:
the first tuple
keyisproxy_serverand thevalueis the name of the Nova server.the second tuple
keyisuuidand thevalueis the Nova server UUID.
The example below shows the execution of a correctly formatted parameter=server query that
finds three different Nova servers candidates to the role of proxy server.
*.query plugin="openstack: endpoint=http://11.11.11.111:2222/v3 OS_USERNAME=admin OS_PASSWORD=123456 OS_USER_DOMAIN_NAME=Default OS_PROJECT_NAME=admin" client=bacula_proxy-fd parameter=server
proxy_server=nfs-instance1
uuid=b12e3313-7c3e-4757-8a12-5a2c9884ad53
proxy_server=www-instance1
uuid=248dd682-f0e9-43c1-8c05-999115459e1a
proxy_server=bacula-proxy
uuid=3b8496f0-740c-41d1-8a08-8c1a50cae461
parameter=check
When using the check option, the query command will check if the base configuration is correct.
It will start by testing if all parameters connection are set.
If all parameters are set, it will then check if the connection to OpenStack services is valid.
Then, it will check if the proxy server is set and available.
If the answers to all those questions are positive, the query will output a single check:ok tuple.
The example below shows the execution of a correctly formatted check query.
*.query Plugin="openstack: proxy_server=bacula-proxy" client=bacula_proxy-fd parameter=check
check=ok
Note
The above query command is using authentication from /opt/bacula/etc/openstack.conf.
Go back to: Operations.