How to manage replicators¶
View replicators¶
To list all replicators in the current project, run:
lxc replicator list
To view the configuration for a specific replicator, run:
lxc replicator show <replicator_name>
To view the current state and job information for a specific replicator, run:
lxc replicator info <replicator_name>
To list all replicators in the current project, send the following request:
lxc query --request GET /1.0/replicators?project=<project_name>
To display detailed information about each replicator, use Recursion:
lxc query --request GET /1.0/replicators?project=<project_name>&recursion=1
See GET /1.0/replicators and GET /1.0/replicators?recursion=1 for more information.
To view the configuration of a specific replicator, send the following request:
lxc query --request GET /1.0/replicators/<name>?project=<project_name>
See GET /1.0/replicators/{name} for more information.
To view the current state and job information for a specific replicator, send the following request:
lxc query --request GET /1.0/replicators/<name>/state?project=<project_name>
See GET /1.0/replicators/{name}/state for more information.
For a single-node cluster, click Server in the navigation sidebar, then select the Replicators tab in the main content pane. Otherwise, click Clustering in the navigation sidebar, then select Replicators from the expanded drop-down list.
To view the configuration for a specific replicator, click on the replicator’s name.
Configure a replicator¶
See Replicator configuration for all available configuration options.
To edit the entire configuration of a replicator at once in your default text editor, run:
lxc replicator edit <replicator_name>
You can also update a single configuration option for a replicator:
lxc replicator set <replicator_name> <key>=<value>
To unset a configuration key, run:
lxc replicator unset <replicator_name> <key>
To edit the entire configuration of a replicator, send the following request:
lxc query --request PUT /1.0/replicators/<name>?project=<project_name> --data "<replicator_configuration>"
See PUT /1.0/replicators/{name} for more information.
You can also update a single configuration option for a replicator:
lxc query --request PATCH /1.0/replicators/<name>?project=<project_name> --data '{"config": {"<key>": "<value>"}}'
See PATCH /1.0/replicators/{name} for more information.
To edit a replicator, click on the pencil icon at the end of that replicator’s row, then set configuration options in the side panel.
Alternatively, click on a replicator name to view its detail page, then click on the Edit button in the header.
Rename a replicator¶
lxc replicator rename <replicator_name> <new_name>
lxc query --request POST /1.0/replicators/<name>?project=<project_name> --data '{"name": "<new_name>"}'
See POST /1.0/replicators/{name} for more information.
To rename a replicator, click on a replicator name to view its detail page. Then click on the replicator name in the header, enter the new name, and click Save.
Delete a replicator¶
lxc replicator delete <replicator_name>
lxc query --request DELETE /1.0/replicators/<name>?project=<project_name>
See DELETE /1.0/replicators/{name} for more information.
To delete a replicator, click on the trash can icon at the end of that replicator’s row.
Alternatively, click on a replicator name to view its detail page, then click on the Delete button in the header.