Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,9 @@ include::cli:partial$cbcli/nav.adoc[]
** xref:rest-api:backup-rest-api.adoc[Backup Service API]
*** xref:rest-api:backup-create-and-edit-plans.adoc[Create and Edit Plans]
*** xref:rest-api:backup-create-repository.adoc[Create a Repository]
*** xref:rest-api:backup-get-repository-info.adoc[Get Information on Repositories]
*** xref:rest-api:backup-get-plan-info.adoc[Get Information on Plans]
*** xref:rest-api:backup-get-task-info.adoc[Get Information on Tasks]
*** xref:rest-api:backup-get-repository-info.adoc[Get Backup Repository Information]
*** xref:rest-api:backup-get-plan-info.adoc[Get Backup Plan Information]
*** xref:rest-api:backup-get-task-info.adoc[Get Backup Task History]
*** xref:rest-api:backup-pause-and-resume-tasks.adoc[Pause and Resume Tasks]
*** xref:rest-api:backup-examine-data.adoc[Examine Backed-Up Data]
*** xref:rest-api:backup-trigger-backup.adoc[Perform an Immediate Backup]
Expand Down
9 changes: 8 additions & 1 deletion modules/introduction/pages/whats-new.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@

For information about platform support changes, deprecation notifications, notable improvements, and fixed and known issues, refer to the xref:release-notes:relnotes.adoc[Release Notes].

[#new-features-762]
== New Features and Enhancements in 7.6.2

The following new features are provided in this release.

include::partial$new-features-76_2.adoc[]

[#new-features]
== New Features and Enhancements
== New Features and Enhancements in 7.6.0

The following new features are provided in this release.

Expand Down
11 changes: 11 additions & 0 deletions modules/introduction/partials/new-features-76_2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[#backup_762]
=== Backup

* Users with the xref:learn:security/roles.adoc#read-only-admin[Read-Only Admin] role can now read backup information from the following Backup Service REST API endpoints:

** xref:rest-api:backup-get-cluster-info.adoc[`/api/v1/cluster/self`]
** xref:rest-api:backup-manage-config.adoc[`/api/v1/config`]
** xref:rest-api:backup-get-repository-info.adoc[`/api/v1/cluster/self/repository/{repo-state}`]
** xref:rest-api:backup-get-task-info.adoc[`/api/v1/cluster/self/repository/{repo-state}/{task-name}/taskHistory`]
** xref:rest-api:backup-get-plan-info.adoc[`/api/v1/plan/`]

157 changes: 83 additions & 74 deletions modules/learn/pages/security/roles.adoc

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modules/rest-api/pages/backup-archive-a-repository.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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 xref:rest-api:backup-get-repository-info.adoc[Get Information on Repositories], xref:rest-api:backup-restore-data.adoc[Restore Data], and xref:rest-api:backup-examine-data.adoc[Examine Backed-Up Data], respectively.)
(See xref:rest-api:backup-get-repository-info.adoc[Get Backup Repository Information], xref:rest-api:backup-restore-data.adoc[Restore Data], and xref:rest-api:backup-examine-data.adoc[Examine Backed-Up Data], respectively.)

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

Expand Down Expand Up @@ -74,6 +74,6 @@ Successful execution returns `200 OK`.
An overview of the Backup Service is provided in xref:learn:services-and-indexes/services/backup-service.adoc[Backup Service].
A step-by-step guide to using Couchbase Web Console to configure and use the Backup Service is provided in xref:manage:manage-backup-and-restore/manage-backup-and-restore.adoc[Manage Backup and Restore].

Information on getting information from an archived repository is provided in xref:rest-api:backup-get-repository-info.adoc[Get Information on Repositories].
Information on getting information from an archived repository is provided in xref:rest-api:backup-get-repository-info.adoc[Get Backup Repository Information].
Information on restoring data from an archived repository is provided in xref:rest-api:backup-restore-data.adoc[Restore Data].
Information on examining data within an archived repository is provided in xref:rest-api:backup-examine-data.adoc[Examine Backed-Up Data].
26 changes: 18 additions & 8 deletions modules/rest-api/pages/backup-get-cluster-info.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
== HTTP Methods and URIs

----
GET /cluster/self
GET /api/v1/cluster/self
----

[#description]
Expand All @@ -20,12 +20,15 @@ Returns a JSON document that contains subdocuments for active, imported, and arc
== Curl Syntax

----
curl -X GET http://<backup-node-ip-address-or-domain-name>:8097/cluster/self
-u <username>:<password>
curl -X GET http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT/api/v1/cluster/self
-u $USERNAME:$PASSWORD
----

Only the host cluster (`self`) can be queried.
The `username` and `password` must be those of a user with the `Full Admin` role.

== Required Permissions

Full Admin, Backup Admin, or Read-Only Admin role.

[#responses]
== Responses
Expand All @@ -51,13 +54,16 @@ An internal error that prevents return of the repository-information returns `50

The following call requests the list of repositories currently defined on the cluster:

[source, curl]
----
curl -v -X GET http://127.0.0.1:8091/_p/backup/api/v1/cluster/self \
curl -v -X GET http://127.0.0.1:8097/api/v1/cluster/self \
-u Administrator:password
----

If successful, the call returns `200 OK`, and an object whose initial part may appear as follows:


[source, json]
----
{
"name": "self",
Expand Down Expand Up @@ -122,13 +128,17 @@ If successful, the call returns `200 OK`, and an object whose initial part may a
.
.
.
}
}
}
}
----

The cluster is thus shown to contain a single imported repository, no archived repositories, and a number of active repositories, two of which can be identified in the fragment shown.

[#see-also]
== See Also

An overview of the Backup Service is provided in xref:learn:services-and-indexes/services/backup-service.adoc[Backup Service].
A step-by-step guide to using Couchbase Web Console to configure and use the Backup Service is provided in xref:manage:manage-backup-and-restore/manage-backup-and-restore.adoc[Manage Backup and Restore].
Information on using the Backup Service REST API to create a repository is provided in xref:rest-api:backup-create-repository.adoc[Create a Repository].
* For an overview of the Backup Service, see xref:learn:services-and-indexes/services/backup-service.adoc[Backup Service].
* For a step-by-step guide to using Couchbase Server Web Console to configure and use the Backup Service, see xref:manage:manage-backup-and-restore/manage-backup-and-restore.adoc[Manage Backup and Restore].
* For information about using the Backup Service REST API to create a repository, see xref:rest-api:backup-create-repository.adoc[Create a Repository].
87 changes: 64 additions & 23 deletions modules/rest-api/pages/backup-get-plan-info.adoc
Original file line number Diff line number Diff line change
@@ -1,60 +1,95 @@
= Get Information on Plans
:description: The Backup Service REST API allows information on plans to be retrieved.
= Get Backup Plan Information
:description: The Backup Service REST API lets you get information about backup plans.

[abstract]
{description}

[#http-methods-and-uris]
== HTTP Methods and URIs

Get a list of all defined backup plans:

----
GET /plan
----

Get detailed information about a specific backup plan:

GET /plan/<plan-id>
----
GET /plan/{PLAN_NAME}
----

.Path Parameters
[cols="2,3,2"]
|===
|Name | Description | Schema

[#description]
== Description
| `PLAN_NAME`
| The name of a backup plan.
| String

The `GET /plan` http method and URI return an array of plans, currently defined for the cluster.
The `GET /plan/<plan-id>` http method and URI return information on a single, specified plan.
|===

[#curl-syntax]
== Curl Syntax

----
curl -X GET http://<backup-node-ip-address-or-domain-name>:8097/plan
-u <username>:<password>
curl -X GET http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT/plan
-u $USERNAME:$PASSWORD

curl -X GET http://<backup-node-ip-address-or-domain-name>:8097/plan/<plan-id>
-u <username>:<password>
curl -X GET http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT:8097/plan/$PLAN_NAME
-u $USERNAME:$PASSWORD
----

The `<plan-id>` must be the name of a plan currently defined for the cluster.
The `username` and `password` must identify an administrator with the Full Admin role.
== Required Permissions

Full Admin, Backup Full Admin, or Read-Only Admin roles.



[#responses]
== Responses

If a specified `plan-id` does not exist, `404 Object Not Found` is returned, with an object such as the following: `{"status":404,"msg":"requested plan not found"}`.

Failure to authenticate returns `401 Unauthorized`.
An incorrectly specified URI returns `404 Object Not Found`.
|===
|Value | Description

| `200 OK` and JSON array containing plan information depending on the specific endpoint.
| Successful call.

| `400`
| Invalid parameter.

| `401 Unauthorized`
| Authorization failure due to incorrect username or password.

| `403 Forbidden`, plus a JSON message explaining the minimum permissions.
| The provided username has insufficient privileges to call this method.

| `404 Object Not found` and the message `{"status":404,"msg":"requested plan not found"}`
| The plan in the endpoint URI does not exist.

| `500 Could not retrieve the requested repository`
| Error in Couchbase Server.

|===

[#examples]
== Examples

The following call returns an array, each of whose members is an object containing information for a plan currently defined for the cluster.
Note that the output is piped to the https://stedolan.github.io/jq[jq^] command, to facilitate readability:
The following call returns an array each of whose members is an object containing information for a plan currently defined for the cluster.
The command pipes the output to the https://stedolan.github.io/jq[`jq`^] command to improve readability:

[source, console]
----
curl -v -X GET http://127.0.0.1:8097/api/v1/api/v1/plan \
-u Administrator:password | jq '.'
----

If the call is successful, `200 OK` is returned, with an array the initial part of which may appear as follows:


[source, json]
----
[
{
Expand Down Expand Up @@ -101,6 +136,10 @@ If the call is successful, `200 OK` is returned, with an array the initial part
.
.
.
}
]
}
]
----

Each object in the array contains information on the specified plan.
Expand All @@ -109,13 +148,15 @@ Each task is listed with an account of its type and schedule.

The following call returns information specifically on the plan `testPlan2`:

[source, console]
----
curl -v -X GET http://127.0.0.1:8091/_p/backup/api/v1/plan/testPlan2 \
-u Administrator:password | jq '.'
----

If the call is successful, `200 OK` is returned, with the following object:

[source, json]
----
{
"name": "testPlan2",
Expand Down Expand Up @@ -150,15 +191,15 @@ If the call is successful, `200 OK` is returned, with the following object:
}
----

The object contains information on the specified plan.
The object contains information about the specified plan.
The information includes confirmation of the services for which data is backed up by the plan; and the tasks that are performed for the plan.
Each task is listed with an account of its type and schedule.


[#see-also]
== See Also

An overview of the Backup Service is provided in xref:learn:services-and-indexes/services/backup-service.adoc[Backup Service].
A step-by-step guide to using Couchbase Web Console to configure and use the Backup Service is provided in xref:manage:manage-backup-and-restore/manage-backup-and-restore.adoc[Manage Backup and Restore].
For information on using the Backup Service REST API to create and edit plans, see xref:rest-api:backup-create-and-edit-plans.adoc[Create and Edit Plans].
For information on deleting plans, see xref:rest-api:backup-delete-plan.adoc[Delete a Plan].
* For an overview of the Backup Service, see xref:learn:services-and-indexes/services/backup-service.adoc[].
* For a step-by-step guide to using Couchbase Server Web Console to configure and use the Backup Service, see xref:manage:manage-backup-and-restore/manage-backup-and-restore.adoc[].
* For Information about using the Backup Service REST API to create a plan, see xref:rest-api:backup-create-and-edit-plans.adoc[].
* For information about deleting plans, see xref:rest-api:backup-delete-plan.adoc[].
Loading