A newer version of this documentation is available.

View Latest

Backup Service API

  • reference
    +
    The Backup Service API allows full and incremental data-backups to be planned and scheduled; allows the scheduling of merges of previously made backups; and allows existing backups to be archived.

    API Overview

    The Backup Service API provides endpoints categorized as follows: Cluster, Configuration, Repository, Plan, Task, and Data. The individual endpoints are listed by category, in the tables below. Each table-entry provides a link to an associated reference page, where more detailed information, including curl examples, is provided. For a conceptual overview of the Backup Service, see Backup Service. For information on using Couchbase Web Console to configure and use the Backup Service, see Manage Backup and Restore.

    All calls listed below require the Full Admin role, and use port 8097. Each URI, in Couchbase Server Enterprise Edition Version 7.0, must be prefixed with /api/v1. Note that for all cluster references, in Couchbase Server Enterprise Edition Version 7.0, only the host cluster is supported, and is referred to as self.

    Cluster

    HTTP method URI Description

    GET

    /cluster/self

    Retrieves information on all active, archived, and imported repositories defined on a cluster.

    See Get Information on the Cluster.

    Configuration

    HTTP method URI Description

    GET

    /config

    Returns the rotation-configuration for the Backup Service.

    See Manage Backup Configuration.

    POST

    /config

    Creates the rotation-configuration for the Backup Service.

    See Manage Backup Configuration.

    PUT

    /config

    Edits the existing rotation-configuration for the Backup Service.

    See Manage Backup Configuration.

    Repository

    HTTP method URI Description

    GET

    /cluster/self/repository/active

    Retrieves information on all active repositories, defined on a cluster. Information includes repository names, file or cluster paths, and plan details.

    See Get Information on Repositories.

    GET

    /cluster/self/repository/active/<repository-id>

    Retrieves information on a specific, active repository, defined on a cluster. Information includes repository names, file or cluster paths, and plan details.

    See Get Information on Repositories.

    GET

    /cluster/self/repository/<'active'|'archived'|'imported'>/<repository-id>/info

    Retrieves information on an active, archived, or imported repository, defined on a cluster. Information includes backup names and dates, buckets, items, and mutations.

    See Get Information on Repositories.

    POST

    /cluster/self/repository/active/<repository-id>

    Creates an active repository on the cluster, specifying an associated plan.

    See Create a Repository.

    POST

    /cluster/self/repository/<'archived'|'imported'>/<repository-id>/restore

    Restores data from a specified archived, or imported repository to the cluster.

    See Restore Data.

    POST

    /cluster/self/repository/import

    Imports an existing repository into the Backup Service.

    See Import a Repository.

    POST

    /cluster/self/repository/<'active'|'archived'|'imported'>/<repository-id>/examine

    Returns information on a specified document, within a specified scope and collection, within the specified active, archived, or imported repository.

    See Examine Backed-Up Data.

    POST

    /cluster/self/repository/active/<repository-id>/backup

    Triggers an immediate backup of the cluster, to the specified repository; specifying whether the backup should be incremental or full.

    See Perform an Immediate Backup.

    POST

    /cluster/self/repository/active/<repository-id>/merge

    Triggers an immediate merge of specified repositories; providing the start and end dates for the period of time within which backups are to be merged.

    See Perform an Immediate Merge.

    POST

    /cluster/self/repository/active/<repository-id>/archive

    Archives the specified, active repository.

    See Archive a Repository.

    GET

    /cluster/self/repository/<'archived'|'imported'>

    Returns information on all the cluster’s archived and imported repositories. Information includes repository names, file or cluster paths, and plan details.

    See Get Information on Repositories.

    GET

    /cluster/self/repository/<'archived'|'imported'>/<repository-id>

    Returns information on a single archived or imported repository. Information includes repository names, file or cluster paths, and plan details.

    See Get Information on Repositories.

    GET

    /cluster/self/repository/<'archived'|'imported'>/<repository-id>/info

    Returns information on a single archived or imported repository. Information includes backup names and dates, buckets, items, and mutations.

    See Get Information on Repositories.

    POST

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

    Triggers an immediate pause of the specified repository, so that all task-processing ceases.

    See Pause and Resume Tasks.

    POST

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

    Triggers an immediate resumption of task-processing, on the specified, paused repository.

    See Pause and Resume Tasks.

    DELETE

    /cluster/self/repository/<'archived'|'imported'>/<repository-id>?remove_repository

    Deletes an archived repository.

    See Delete a Repository.

    DELETE

    /cluster/self/repository/active/<repository-id>/backups/<backup-id>

    Deletes a backup.

    See Delete a Backup.

    Plan

    HTTP method URI Description

    GET

    /cluster/plan

    Returns an array containing all plans defined on the cluster.

    See Get Information on Plans.

    GET

    /cluster/plan/<plan-id>

    Returns a specific plan, defined on the cluster.

    See Get Information on Plans.

    POST

    /cluster/plan/<plan-id>

    Creates a new plan on the cluster.

    See Create and Edit Plans.

    PUT

    /cluster/plan/<plan-id>

    Edits an existing plan, defined on the cluster.

    See Create and Edit Plans.

    DELETE

    /plan/<plan-id>

    Deletes a plan.

    See Delete a Plan.

    Task

    HTTP method URI Description

    GET

    /cluster/self/repository/<'active'|'archived'|'imported'>/<repository-id>/taskHistory

    Returns an array, containing the history of all tasks performed for the specified repository.

    See Get Information on Tasks.

    GET

    /cluster/self/repository/<'active'|'archived'|'imported'>/<repository-id>/taskHistory?<task-subset-specification-string>

    Returns an array, containing the history of a specific subset of tasks performed for the specified repository.

    See Get Information on Tasks.

    Data

    HTTP method URI Description

    DELETE

    /cluster/self/repository/active/<repository-id>/backups/<backup-id>

    Deletes the specified backup from the specified active repository..

    See Delete Backups.