You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/current/_includes/cockroachcloud/backups/cloud-api-backup-settings.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Set the following:
14
14
-`{cluster_id}` is the unique ID of the cluster. Use this ID when making API requests. You can find the cluster ID in the cluster's Cloud Console page. Find your cluster ID in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`. The ID should resemble `f78b7feb-b6cf-4396-9d7f-494982d7d81e`.
15
15
-`{secret_key}` is your API key. Refer to [API Access]({% link cockroachcloud/managing-access.md %}#api-access) for more details.
16
16
17
-
If the request was successful, the API will return details about the managed backup settings:
17
+
If the request is successful, the API will return details about the managed backup settings:
18
18
19
19
~~~json
20
20
{
@@ -53,7 +53,7 @@ Set the following:
53
53
-`{frequency_minutes}` determines [how often](#frequency) the managed backup will run in minutes. Possible values are: `5`, `10`, `15`, `30`, `60`, `240` (4 hours), `1440` (24 hours).
54
54
-`{retention_days}` sets the number of days Cockroach Labs will [retain](#retention) the managed backup in storage. You can change `retention_days` for the cluster **once** (whether in the Cloud API or [Cloud Console](#cloud-console)). Possible values are: `2`, `7`, `30`, `90`, `365`.
55
55
56
-
If `{retention_days}` has previously been modified (in the Cloud API or Cloud Console), you will receive the message "cluster already has a retention policy set, open a support ticket to change it". To modify the setting again, contact the [Cockroach Labs Support team]({% link {{site.current_cloud_version}}/support-resources.md %}).
56
+
If `{retention_days}` has previously been modified (in the Cloud API or Cloud Console), you receive the message "cluster already has a retention policy set, open a support ticket to change it". To modify the setting again, contact the [Cockroach Labs Support team]({% link {{site.current_cloud_version}}/support-resources.md %}).
57
57
-`{secret_key}` is your API key. Refer to [API Access]({% link cockroachcloud/managing-access.md %}#api-access) for more details.
58
58
59
-
If the request was successful, the client will receive an empty HTTP 200 OK status response.
59
+
If the request is successful, the client recieves an empty HTTP 200 OK status response.
Copy file name to clipboardExpand all lines: src/current/_includes/cockroachcloud/backups/cloud-api-backup-view.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ curl --request GET \
9
9
--header 'Authorization: Bearer {secret_key}' \
10
10
~~~
11
11
12
-
If the request was successful, the client will receive a JSON response listing backups with their unique `{id}` and`{as_of_time}`creation timestamp:
12
+
If the request is successful, the client recieves a JSON response listing backups with their unique `{id}`. The`{as_of_time}` timestamp describes the system time of the cluster when the backup was created:
Copy file name to clipboardExpand all lines: src/current/_includes/cockroachcloud/backups/cloud-api-managed-backup-intro.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
{% if page.name == "managed-backups-basic.md" %}
2
-
You can use the [CockroachDB Cloud API]({% link cockroachcloud/cloud-api.md %}) to [view managed backups](#view-managed-backups) or [restore clusters/databases/tables](#restore-from-a-managed-backup) from a managed backup.
2
+
You can use the [CockroachDB Cloud API]({% link cockroachcloud/cloud-api.md %}) to [view managed backups](#view-managed-backups) or [restore clusters](#restore-from-a-managed-backup) from a managed backup.
3
+
{% else if page.name == "managed-backups.md" %}
4
+
You can use the [CockroachDB Cloud API]({% link cockroachcloud/cloud-api.md %}) to [view](#get-information-on-backup-settings) and [modify managed backup settings](#modify-backup-settings-on-a-cluster), [view managed backups](#view-managed-backups), or [restore clusters](#restore-from-a-managed-backup) from a managed backup.
3
5
{% else %}
4
6
You can use the [CockroachDB Cloud API]({% link cockroachcloud/cloud-api.md %}) to [view](#get-information-on-backup-settings) and [modify managed backup settings](#modify-backup-settings-on-a-cluster), [view managed backups](#view-managed-backups), or [restore clusters/databases/tables](#restore-from-a-managed-backup) from a managed backup.
Copy file name to clipboardExpand all lines: src/current/_includes/cockroachcloud/backups/cloud-api-restore-endpoint.md
+48-34Lines changed: 48 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,33 @@
1
1
### Restore from a managed backup
2
2
3
-
You can use the `/v1/clusters/{cluster_id}/restores` endpoint to restore the contents of a managed backup at the cluster, database, or table level.
3
+
You can use the `/v1/clusters/{destination_cluster_id}/restores` endpoint to restore the contents of a managed backup to a specified destination cluster.
4
4
5
5
{% if page.name == "managed-backups-advanced.md" %}
6
-
On Advanced clusters, restore operations can be performed into the same cluster or a different Advanced cluster in the same organization.
6
+
On Advanced clusters, restore operations can be performed at the cluster, database, or table level into the same cluster or a different Advanced cluster in the same organization.
7
7
{% else %}
8
-
On Standard and Basic clusters, restore operations can only be performed into the same cluster where the managed backup is stored.
8
+
On Standard and Basic clusters, restore operations can only be performed into the same cluster where the managed backup is stored. Managed backups can only be restored at the cluster level.
9
9
{% endif %}
10
10
11
11
#### Restore a cluster
12
12
13
-
{{site.data.alerts.callout_danger}}
14
-
The restore operation completely erases all data in the destination cluster. All cluster data is replaced with the data from the backup. The destination cluster will be unavailable while the job is in progress.
15
-
16
-
This operation is disruptive and is to be performed with caution. Use the [Principle of Least Privilege (PoLP)](https://wikipedia.org/wiki/Principle_of_least_privilege) as a golden rule when designing your system of privilege grants.
13
+
{{site.data.alerts.callout_info}}
14
+
Before a cluster can be restored from a managed backup, the destination cluster must be completely wiped of data. A cluster restore operation fails if the destination cluster contains any databases/schemas/tables.
17
15
{{site.data.alerts.end}}
18
16
19
-
To restore a managed backup of a cluster, send a `POST` request to the `/v1/clusters/{cluster_id}/restores` endpoint of `"type": "CLUSTER"`:
17
+
To restore a cluster to a recent managed backup, send a `POST` request to the `/v1/clusters/{cluster_id}/restores` endpoint of `"type": "CLUSTER"`:
By default the restore operation will use the most recent backup. To restore a specific backup, include the `backup_id` field specifying a backup ID:
30
+
By default, the restore operation uses the most recent backup stored within the last 7 days on the cluster specified in `source_cluster_id`. To restore a specific backup, include the `backup_id` field and specify a backup ID from the [managed backups list](#view-managed-backups):
32
31
33
32
{% include_cached copy-clipboard.html %}
34
33
~~~shell
@@ -42,12 +41,12 @@ curl --request POST \
42
41
~~~
43
42
44
43
{% if page.name == "managed-backups-advanced.md" %}
45
-
To restore a cluster backup into a new cluster, first create the target cluster. Send the restore request to the target cluster ID, specifying the ID of the source cluster as `source_cluster_id`. Both the source cluster and the target cluster must use the Advanced plan.
44
+
To restore a cluster backup into a different cluster, ensure that the destination cluster is created and contains no databases/schemas/tables. Send the restore request to the destination cluster ID, specifying the ID of the source cluster as `source_cluster_id`. Both the source cluster and the destination cluster must use the Advanced plan.
You can specify additional options for the restore operations in the `restore_opts` object. For more information, see the [API endpoint documentation](https://www.cockroachlabs.com/docs/api/cloud/v1#get-/api/v1/clusters/-cluster_id-/restores-config).
58
+
You can specify additional options for the restore operation in the `restore_opts` object. For more information, see the [API endpoint documentation](https://www.cockroachlabs.com/docs/api/cloud/v1#get-/api/v1/clusters/-cluster_id-/restores-config).
60
59
61
-
If the request was successful, the client will receive a response containing JSON describing the request operation:
60
+
If the request is successful, the client recieves a JSON response that describes the request operation:
62
61
63
62
~~~json
64
63
{
@@ -67,37 +66,43 @@ If the request was successful, the client will receive a response containing JSO
67
66
"status": "PENDING",
68
67
"created_at": "2025-07-25T16:45:14.064208710Z",
69
68
"type": "CLUSTER",
70
-
"completion_percent": 0
69
+
"completion_percent": 1
71
70
}
72
71
~~~
73
72
73
+
{% if page.name == "managed-backups-advanced.md" %}
74
74
#### Restore a database
75
75
76
-
To restore a database from a managed backup to a cluster, send a `POST` request to the `/v1/clusters/{cluster_id}/restores` endpoint of `"type": "DATABASE"`. Specify the name of the source database in `objects.database`:
76
+
To restore one or more databases from a cluster's managed backup, send a `POST` request to the `/v1/clusters/{cluster_id}/restores` endpoint of `"type": "DATABASE"`. Specify the name of the databases in `objects`:
By default the database will be restored into the original database name from the managed backup. To restore the database contents into a new database, include the field `restore_opts.new_db_name` with the new database name:
97
+
By default, the database is restored into the original database name from the managed backup. To restore the database contents into a new database, include the field `restore_opts.new_db_name` with the new database name. You can only restore one database at a time when using this option.
{% if page.name == "managed-backups-advanced.md" %}
132
-
To restore a database from a managed backup into a different cluster, send the restore request to the target cluster ID. Specify the ID of the backup's cluster as `source_cluster_id`. Both the source cluster and the target cluster must use the Advanced plan.
136
+
To restore a database from a source cluster's managed backup into a different cluster, send the restore request to the destination cluster ID. Specify the ID of the backup's cluster as `source_cluster_id`. Both the source cluster and the destination cluster must use the Advanced plan.
You can specify additional options for the restore operations in the `restore_opts` object. For more information, see the [API endpoint documentation](https://www.cockroachlabs.com/docs/api/cloud/v1#get-/api/v1/clusters/-cluster_id-/restores-config).
152
155
153
-
If the request was successful, the client will receive a response containing JSON describing the request operation:
156
+
If the request is successful, the client recieves a response containing JSON describing the request operation:
154
157
155
158
~~~json
156
159
{
@@ -159,45 +162,57 @@ If the request was successful, the client will receive a response containing JSO
159
162
"status": "PENDING",
160
163
"created_at": "2025-07-25T16:45:14.064208710Z",
161
164
"type": "DATABASE",
162
-
"completion_percent": 0
165
+
"completion_percent": 1
163
166
}
164
167
~~~
165
168
166
169
#### Restore a table
167
170
168
-
To restore a table from a managed backup to a cluster, send a `POST` request to the `/v1/clusters/{cluster_id}/restores` endpoint of `"type": "TABLE"`. Specify the fully qualified name of the source table in `objects`:
171
+
To restore a one or more tables from a cluster's managed backup, send a `POST` request to the `/v1/clusters/{cluster_id}/restores` endpoint of `"type": "TABLE"`. Specify the fully qualified name of the source tables in `objects`:
By default the table will be restored into the original database name from the managed backup. To restore the table into a different database, include the field `restore_opts.into_name` with the desired database name. The following example restores the `tpcc.public.warehouse` table from the most recent managed backup into `tpcc2.public.warehouse` on the cluster:
196
+
By default, the table is restored into the original database name from the managed backup. To restore the table into a different database, include the field `restore_opts.into_db` with the desired database name. The following example restores the `tpcc.public.warehouse` table from the most recent managed backup into `tpcc2.public.warehouse` on the cluster:
{% if page.name == "managed-backups-advanced.md" %}
230
-
To restore a table from a managed backup into a different cluster, send the restore request to the target cluster ID. Specify the ID of the backup's cluster as `source_cluster_id`. Both the source cluster and the target cluster must use the Advanced plan.
244
+
To restore a table from a source cluster's managed backup into a different cluster, send the restore request to the destination cluster ID. Specify the ID of the backup's cluster as `source_cluster_id`. Both the source cluster and the destination cluster must use the Advanced plan.
You can specify additional options for the restore operations in the `restore_opts` object. For more information, see the [API endpoint documentation](https://www.cockroachlabs.com/docs/api/cloud/v1#get-/api/v1/clusters/-cluster_id-/restores-config).
252
265
253
-
If the request was successful, the client will receive a response containing JSON describing the request operation:
266
+
If the request is successful, the client recieves a response containing JSON describing the request operation:
To view the status of a restore operation using the cloud API, send a `GET` request to the `/v1/clusters/{cluster_id}/restores/{restore_id}` endpoint:
282
+
To view the status of a restore operation using the cloud API, send a `GET` request to the `/v1/clusters/{cluster_id}/restores/{restore_id}` endpoint where `restore_id` is the `id` from the JSON response:
269
283
270
284
{% include_cached copy-clipboard.html %}
271
285
~~~shell
@@ -274,7 +288,7 @@ curl --request GET \
274
288
--header 'Authorization: Bearer {secret_key}' \
275
289
~~~
276
290
277
-
If the request was successful, the client will receive a response containing JSON describing the status of the specified request operation:
291
+
If the request is successful, the client recieves a response containing JSON describing the status of the specified request operation:
278
292
279
293
~~~json
280
294
{
@@ -283,6 +297,6 @@ If the request was successful, the client will receive a response containing JSO
0 commit comments