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.
Configure a replicator¶
See Replicator configuration for all available configuration options.
You can edit the entire configuration at once:
To edit a replicator in your default text editor, run:
lxc replicator edit <replicator_name>
To edit 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 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>
lxc query --request PATCH /1.0/replicators/<name>?project=<project_name> --data '{"config": {"<key>": "<value>"}}'
See PATCH /1.0/replicators/{name} for more information.
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.
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.