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/v25.4/cluster-virtualization-overview.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,9 @@ To upgrade to a new major version when cluster virtualization is enabled, you mu
58
58
59
59
For details, refer to [Work with virtual clusters]({% link {{ page.version.version }}/work-with-virtual-clusters.md %}#upgrade-a-cluster).
60
60
61
-
### Disaster recovery
61
+
### Backup and restore
62
+
63
+
Having a [disaster recovery]({% link {{ page.version.version }}/disaster-recovery-overview.md %}) plan is important to recover from unforseen incidents and minimize downtime and data loss.
62
64
63
65
When cluster virtualization is enabled, [backup]({% link {{ page.version.version }}/backup.md %}) and [restore]({% link {{ page.version.version }}/restore.md %}) commands are scoped to a virtual cluster. This means that:
Copy file name to clipboardExpand all lines: src/current/v25.4/work-with-virtual-clusters.md
+9-80Lines changed: 9 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,13 +116,13 @@ When connected to a virtual cluster from the DB Console, metrics which measure S
116
116
117
117
## Backup and restore
118
118
119
-
Cockroach Labs recommends that you regularly [back up]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#full-backups) your data. When using virtual clusters, perform backups on the _application virtual cluster (app VC)_. Only the app VC's data and settings are included in these backups, and data and settings for other virtual clusters or for the _system virtual cluster (system VC)_ are omitted.
119
+
Cockroach Labs recommends that you regularly [back up]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#full-backups) your data. When using virtual clusters, perform backups on the _application virtual cluster (app VC)_. Only the app VC's data and settings are included in these backups, and data and settings for other virtual clusters or for the _system virtual cluster (system VC)_ are omitted. You can also back up your system VC to preserve metadata such as users and cluster settings, but this data is usually not critical.
120
120
121
121
### Create a backup schedule for your app VC
122
122
123
123
Cockroach Labs recommends using [backup schedules]({% link {{ page.version.version }}/create-schedule-for-backup.md %}) to automate full and incremental backups of your data.
124
124
125
-
Use the following process to create a schedule for a cluster-level backup of your app VC. In this example, the schedule takes revision history for the backup every day at midnight.
125
+
Use the following process to create a schedule for a cluster-level backup of your app VC. In this example, the schedule takes an incremental backup every day at midnight, and a full backup weekly. Consult [CREATE SCHEDULE FOR BACKUP]({% link {{ page.version.version }}/create-schedule-for-backup.md %}#parameters) for a full list of backup schedule options.
126
126
127
127
1.[Connect](#connect-to-a-virtual-cluster) to the app VC as a user with [supported privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) on the app VC. In this example the user has the `BACKUP` privilege.
128
128
@@ -139,7 +139,6 @@ Use the following process to create a schedule for a cluster-level backup of you
139
139
~~~ sql
140
140
CREATE SCHEDULE schedule_label
141
141
FOR BACKUP INTO 's3://test/backups/schedule_test?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=x'
142
-
WITH revision_history
143
142
RECURRING '@daily';
144
143
~~~
145
144
@@ -155,9 +154,9 @@ Use the following process to create a schedule for a cluster-level backup of you
155
154
156
155
For information on scheduling backups at different levels or with other options, consult [CREATE SCHEDULE FOR BACKUP]({% link {{ page.version.version }}/create-schedule-for-backup.md %}).
157
156
158
-
### Back up your app VC
157
+
### Take a one-off backup of your app VC
159
158
160
-
Use the following process to take a one-off full backup of your app VC.
159
+
Use the following process to take a one-off full backup of your app VC. Even if you are using backup schedules, this can be useful if you want to create a separate copy.
161
160
162
161
1. [Connect](#connect-to-a-virtual-cluster) to the app VC as a user with [supported privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) on the app VC. In this example the user has the `BACKUP` privilege.
163
162
@@ -175,79 +174,7 @@ Use the following process to take a one-off full backup of your app VC.
175
174
BACKUP INTO 'external://backup_s3/app' AS OF SYSTEM TIME '-10s';
176
175
~~~
177
176
178
-
### Back up a database from your app VC
179
-
180
-
Use the following process to take a one-off database-level backup on your app VC.
181
-
182
-
1. [Connect](#connect-to-a-virtual-cluster) to the app VC as a user with [supported privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) on the app VC. In this example the user has the `BACKUP` privilege.
183
-
184
-
{% include_cached copy-clipboard.html %}
185
-
~~~ shell
186
-
cockroach sql --url \
187
-
"postgresql://root@{primary node IP or hostname}:26257?options=-ccluster={app_virtual_cluster_name}&sslmode=verify-full" \
188
-
--certs-dir "certs"
189
-
~~~
190
-
191
-
1. [Back up]({% link {{ page.version.version }}/backup.md %}#back-up-a-database) a single database:
192
-
193
-
{% include_cached copy-clipboard.html %}
194
-
~~~ sql
195
-
BACKUP DATABASE bank INTO 'external://backup_s3/app/db' AS OF SYSTEM TIME '-10s';
196
-
~~~
197
-
198
-
Or back up multiple databases:
199
-
200
-
{% include_cached copy-clipboard.html %}
201
-
~~~ sql
202
-
BACKUP DATABASE bank, employees INTO 'external://backup_s3/app/db' AS OF SYSTEM TIME '-10s';
203
-
~~~
204
-
205
-
### Back up a table or view from your app VC
206
-
207
-
Use the following procecss to take a one-off table-level or view-level backup on your app VC.
208
-
209
-
1. [Connect](#connect-to-a-virtual-cluster) to the app VC as a user with [supported privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) on the app VC. In this example the user has the `BACKUP` privilege.
210
-
211
-
{% include_cached copy-clipboard.html %}
212
-
~~~ shell
213
-
cockroach sql --url \
214
-
"postgresql://root@{primary node IP or hostname}:26257?options=-ccluster={app_virtual_cluster_name}&sslmode=verify-full" \
215
-
--certs-dir "certs"
216
-
~~~
217
-
218
-
1. [Back up]({% link {{ page.version.version }}/backup.md %}#back-up-a-table-or-view) a single table or view:
219
-
220
-
{% include_cached copy-clipboard.html %}
221
-
~~~ sql
222
-
BACKUP bank.customers INTO 'external://backup_s3/app/table' AS OF SYSTEM TIME '-10s';
223
-
~~~
224
-
225
-
Or back up multiple tables:
226
-
227
-
{% include_cached copy-clipboard.html %}
228
-
~~~ sql
229
-
BACKUP bank.customers, bank.accounts INTO 'external://backup_s3/app/table' AS OF SYSTEM TIME '-10s';
230
-
~~~
231
-
232
-
### Back up a schema from your app VC
233
-
234
-
Use the following procecss to take a one-off schema-level backup on your app VC using a wildcard (`*`).
235
-
236
-
1. [Connect](#connect-to-a-virtual-cluster) to the app VC as a user with [supported privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) on the app VC. In this example the user has the `BACKUP` privilege.
237
-
238
-
{% include_cached copy-clipboard.html %}
239
-
~~~ shell
240
-
cockroach sql --url \
241
-
"postgresql://root@{primary node IP or hostname}:26257?options=-ccluster={app_virtual_cluster_name}&sslmode=verify-full" \
242
-
--certs-dir "certs"
243
-
~~~
244
-
245
-
1. [Back up]({% link {{ page.version.version }}/backup.md %}#back-up-all-tables-in-a-schema) all tables in a schema:
246
-
247
-
{% include_cached copy-clipboard.html %}
248
-
~~~ sql
249
-
BACKUP test_schema.* INTO 'external://backup_s3/app/schema' AS OF SYSTEM TIME '-10s';
250
-
~~~
177
+
You can also take one-off backups of a single [database]({% link {{ page.version.version }}/backup.md %}#back-up-a-database) or [table]({% link {{ page.version.version }}/backup.md %}#back-up-a-table-or-view) on your app VC. For more information on backup options, consult [BACKUP]({% link {{ page.version.version }}/backup.md %}).
251
178
252
179
### Back up your system VC
253
180
@@ -273,9 +200,9 @@ You can also back up your system VC to preserve metadata such as users and clust
273
200
274
201
### Restore a virtual cluster
275
202
276
-
If needed, you can restore backups to a new app VC with no user-created databases or tables. To restore your app VC from the latest full backup:
203
+
If needed, you can restore a full backup to a new app VC with no user-created databases or tables. To restore your app VC from the latest full backup:
277
204
278
-
1. [Connect to the destination app VC](#connect-to-a-virtual-cluster) as a user with [supported privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) on the system VC. In this example the user has the `RESTORE` privilege.
205
+
1. [Connect to the destination app VC](#connect-to-a-virtual-cluster) as a user with [supported privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) on the app VC. In this example the user has the `RESTORE` privilege.
279
206
280
207
{% include_cached copy-clipboard.html %}
281
208
~~~ shell
@@ -291,6 +218,8 @@ If needed, you can restore backups to a new app VC with no user-created database
291
218
RESTORE FROM LATEST IN 's3://bucket/path?AUTH=implicit';
292
219
~~~
293
220
221
+
You can also restore a [database-level]({% link {{ page.version.version }}/restore.md %}#restore-a-database) or [table-level]({% link {{ page.version.version }}/restore.md %}#restore-a-table) backup to the same app VC on which you created it. For more information on restore options, consult [RESTORE]({% link {{ page.version.version }}/restore.md %}).
222
+
294
223
## Configure cluster settings
295
224
296
225
When [cluster virtualization]({% link {{ page.version.version }}/cluster-virtualization-overview.md %}) is enabled, each [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) is scoped to either a virtual cluster or the system virtual cluster.
0 commit comments