The stop command stops a Capture Process or an Apply Process, all the processes of one kind, or all the processes. Without parameters it stops every process that is running; a process that has failed is stopped as well, and its state changes to stopped. The parameters process and id, the states in which a process accepts the command and the HTTP codes are explained on PROCESS CONTROL COMMANDS.
repcli stop [process=capture|apply [id=processID [restart=1]]]| Parameter | Description |
|---|---|
| process | capture for the Capture Processes, apply for the Apply Processes. Without it the command is sent to all the processes. |
| id | The identifier of the process. It needs process. Without it the command is sent to all the processes of that kind. |
| restart | 1 stops the process and runs it again as soon as it has stopped. It is written after process and id, so it works with one process. The Web UI uses it for “Restart Now”. A failed process is only stopped. |
repcli prints a line for every process the command is meant for: the status in brackets and the message.
| Status | Meaning |
|---|---|
| In Process | The command has been sent to the process. The process needs a few seconds to finish its work, use the status command to monitor it: while it stops it shows STOP (In Process), when it has stopped it shows RUN (Completed), Waiting for the Next Command. |
| Failed | The command has not been sent. The message tells why: the process is stopped already (Command [STOP] is not valid for this status), the id does not exist, or a parameter is wrong (see the messages on PROCESS CONTROL COMMANDS). |
Stop all the processes:
repcli stop
[In Process]: Command [STOP] has been sent. Use [status] command to monitor the Capture 1 process
[In Process]: Command [STOP] has been sent. Use [status] command to monitor the Apply 1 processStop the same processes again. They are stopped already, so nothing is sent:
repcli stop
[Failed]: Capture 1 Process status is [Completed]. Command [STOP] is not valid for this status
[Failed]: Apply 1 Process status is [Completed]. Command [STOP] is not valid for this statusStop an Apply Process and run it again at once:
repcli stop process=apply id=1 restart=1
[In Process]: Command [STOP] has been sent. Use [status] command to monitor the Apply 1 processThe body of the request. The element parameters is optional: without it the command is sent to all the processes. To restart one process add the third pair:
{
"command": "stop",
"parameters": [
["process", "apply"],
["id", "1"],
["restart", "1"]
]
}The body of the answer is an array with an element for every process the command is meant for. The element names the process in its message:
[
{
"command": "STOP",
"status": "In Process",
"message": "Command [STOP] has been sent. Use [status] command to monitor the Apply 1 process"
}
]| HTTP code | Meaning |
|---|---|
| 200 | The request is valid. The body has an element for every process the command is meant for, with the status In Process or Failed. |
| 401 | The token is invalid. |
| 422 | The request is invalid: the JSON, the command, a parameter, or the process does not exist. The body has one element with the status Failed and the message. |
Click “Stop All” on the dashboard to stop all the processes, or “Stop” on the card of a process to stop that process. Both ask for a confirmation. After a change of the configuration of a running process the Web UI offers “Restart Now”, which sends stop with restart=1. The buttons, the confirmations and the state of the cards are shown in Stop/Run Replication Processes.
Prev page:
Run any Capture or Apply ProcessesNext page:
Status of any Capture or Apply Processes