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-restore-endpoint.md
+48-6Lines changed: 48 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ curl --request POST \
87
87
"database": "tpcc"
88
88
}
89
89
]
90
-
}
90
+
}'
91
91
~~~
92
92
93
93
By default the database will be restored into the original database name from the cluster backup. To restore the database contents into a new database, include the field `restore_opts.new_db_name` with the new database name:
@@ -107,7 +107,7 @@ curl --request POST \
107
107
"restore_opts": {
108
108
"new_db_name": "tpcc2"
109
109
}
110
-
}
110
+
}'
111
111
~~~
112
112
113
113
To restore a specific backup rather than the most recently created managed backup, include the `backup_id` field specifying a backup ID:
@@ -125,8 +125,28 @@ curl --request POST \
125
125
"database": "tpcc"
126
126
}
127
127
],
128
-
}
128
+
}'
129
+
~~~
130
+
131
+
{% 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.
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).
132
152
@@ -161,7 +181,7 @@ curl --request POST \
161
181
"table": "warehouse"
162
182
}
163
183
]
164
-
}
184
+
}'
165
185
~~~
166
186
167
187
By default the table will be restored into the original database name from the cluster backup. To restore the table into a different database, include the field `restore_opts.into_name` with the database name. The following example restores the `tpcc.public.warehouse` table from the most recent managed backup into `tpcc2.public.warehouse` on the cluster:
@@ -183,7 +203,7 @@ curl --request POST \
183
203
"restore_opts": {
184
204
"into_db": "tpcc2"
185
205
}
186
-
}
206
+
}'
187
207
~~~
188
208
189
209
To restore a specific backup rather than the most recently created managed backup, include the `backup_id` field specifying a backup ID:
@@ -203,8 +223,30 @@ curl --request POST \
203
223
"table": "warehouse"
204
224
}
205
225
]
206
-
}
226
+
}'
227
+
~~~
228
+
229
+
{% 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.
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).
0 commit comments