From 536ff32d47a3f1c744ce2bf252bf53983e52290e Mon Sep 17 00:00:00 2001 From: dlavigne Date: Fri, 15 Jan 2016 12:22:45 -0500 Subject: [PATCH] Doc initreplication action. --- api/classes/lifepreserver.rst | 78 ++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/api/classes/lifepreserver.rst b/api/classes/lifepreserver.rst index a601378..16c6250 100644 --- a/api/classes/lifepreserver.rst +++ b/api/classes/lifepreserver.rst @@ -21,7 +21,7 @@ Every lifepreserver class request contains the following parameters: | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ | action | | supported actions include "listcron", "cronsnap", "cronscrub", "listsnap", "revertsnap", "removesnap", | -| | | "addreplication", "settings", and "savesettings" | +| | | "addreplication", "initreplication", "settings", and "savesettings" | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ @@ -565,6 +565,82 @@ The "addreplication" action is used to create a replication task in Life Preserv } +.. _Initialize Replication: + +Initialize Replication +====================== + +The "initreplication" action can be used to clear the replication data on the remote server. This is useful if a replication becomes stuck. After running this action, issue a +"runreplication" action to start a new replication. + +The "initreplication" action supports the following parameters: + ++---------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| **Parameter** | **Description** | +| | | ++=================================+======================================================================================================================+ +| host | remote hostname or IP address | +| | | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| dataset | name of local dataset or pool being replicated | +| | | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +**REST Request** + +.. code-block:: json + + PUT /sysadm/lifepreserver + { + "dataset" : "tank1", + "host" : "192.168.0.9", + "action" : "initreplication" + } + +**REST Response** + +.. code-block:: json + + { + "args": { + "initreplication": { + "dataset": "tank1", + "host": "192.168.0.9" + } + } + } + +**WebSocket Request** + +.. code-block:: json + + { + "id" : "fooid", + "args" : { + "host" : "192.168.0.9", + "dataset" : "tank1", + "action" : "initreplication" + }, + "namespace" : "sysadm", + "name" : "lifepreserver" + } + +**WebSocket Response** + +.. code-block:: json + + { + "args": { + "initreplication": { + "dataset": "tank1", + "host": "192.168.0.9" + } + }, + "id": "fooid", + "name": "response", + "namespace": "sysadm" + } + .. _View Settings: View Settings