Pause and Resume Tasks

      +
      The Backup Service REST API allows the running of tasks for a specified, active repository to be paused, and then resumed.

      HTTP Method and URI

      POST /cluster/self/repository/active/<repository-id>/pause
      
      POST /cluster/self/repository/active/<repository-id>/resume

      Description

      The repository-id must be the name of an active repository on the cluster. The respective URIs pause and resume the running of all tasks for the repository.

      Curl Syntax

      curl -X POST http://<backup-node-ip-address-or-domain-name>:8097/\
        api/v1/cluster/self/repository/active/<repository-id>/pause \
        -u Administrator:password
      
      curl -X POST http://<backup-node-ip-address-or-domain-name>:8097/\
        api/v1/cluster/self/repository/active/<repository-id>/resume
        -u Administrator:password

      The username and password must identify an administrator with the Full Admin role. The repository-id argument must specify the name of an active repository defined on the cluster.

      Responses

      For both URIs, success returns 200 OK. Note that neither resuming already running tasks nor pausing already paused tasks has any effect: both return 200 OK.

      An incorrectly specified URI returns 404 Object Not Found, and a message such as the following: {"status":404,"msg":"could not find repository with id: testR3epo"}. Failure to authenticate returns 401 Unauthorized.

      Examples

      The following call pauses the running of tasks for the active repository testRepo:

      curl -v -X POST  http://127.0.0.1:8097/api/v1/cluster/self/\
      repository/active/testRepo/pause \
      -u Administrator:password

      Success returns 200 OK.

      The following call resumes the running of tasks for testRepo:

      curl -v -X POST  http://127.0.0.1:8097/api/v1/cluster/self/\
      repository/active/testRepo/resume \
      -u Administrator:password

      Again, success returns 200 OK.

      See Also

      An overview of the Backup Service is provided in Backup Service. A step-by-step guide to using Couchbase Web Console to configure and use the Backup Service is provided in Manage Backup and Restore. Information on using the Backup Service REST API to create a plan (and in so doing, define one or more tasks) is provided in Create and Edit Plans. To get information on currently defined tasks, see Get Backup Task History.