A newer version of this documentation is available.

View Latest

Archive a Repository

      The Backup Service REST API supports the archiving of currently active repositories.

      HTTP Method and URI

      POST /repository/active/<repository-id>/archive


      Archives the specified repository. This means that no further scheduled or manually triggered tasks can be run on the repository; with the exception of those that retrieve information, restore data, and examine data. (See Get Information on Repositories, Restore Data, and Examine Backed-Up Data, respectively.)

      Note that a repository that has been archived cannot be returned to active state.

      Curl Syntax

      curl -X POST http://<backup-node-ip-address-or-domain-name>:8097/api/v1/cluster/self/\
        -d <repository-id-specification>
        -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. Additionally, a respository-id-specification must be provided, as a JSON payload; whose syntax is as follows:


      The archived-repository-id is the name that the repository is to bear, once it has been archived.


      Success returns 200 OK.

      Incorrect specification of the repository-id path-parameter returns 404 Object Not Found, and a message such as the following: {"status":404,"msg":"could not find active repository with id:quickRepo"}. An otherwise incorrectly specified URI alsp returns 404 Object Not Found.

      Incorrect specification, within the JSON payload, of the repository id returns 400 Bad Request, and a message such as the following: {"status":400,"msg":"repository id must follow the rules ^[0-9A-Za-z][0-9A-Za-z_-]{0,49}$"}.

      Failure to authenticate returns 401 Unauthorized.


      The following example archives the currently active repository quickRepo:

      curl -v -X POST\
      repository/active/quickRepo/archive \
      --data '{"id": "quickRepo"}' \
      -u   -u <username>:<password>

      Successful execution 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 getting information from an archived repository is provided in Get Information on Repositories. Information on restoring data from an archived repository is provided in Restore Data. Information on examining data within an archived repository is provided in Examine Backed-Up Data.