Skip to content

Commit 2b3fc7e

Browse files
Second review
Changes from second round of reviews
1 parent 295db29 commit 2b3fc7e

File tree

2 files changed

+12
-81
lines changed

2 files changed

+12
-81
lines changed

src/current/v25.4/cluster-virtualization-overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ To upgrade to a new major version when cluster virtualization is enabled, you mu
5858

5959
For details, refer to [Work with virtual clusters]({% link {{ page.version.version }}/work-with-virtual-clusters.md %}#upgrade-a-cluster).
6060

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.
6264

6365
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:
6466

src/current/v25.4/work-with-virtual-clusters.md

Lines changed: 9 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ When connected to a virtual cluster from the DB Console, metrics which measure S
116116

117117
## Backup and restore
118118

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.
120120

121121
### Create a backup schedule for your app VC
122122

123123
Cockroach Labs recommends using [backup schedules]({% link {{ page.version.version }}/create-schedule-for-backup.md %}) to automate full and incremental backups of your data.
124124

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.
126126

127127
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.
128128

@@ -139,7 +139,6 @@ Use the following process to create a schedule for a cluster-level backup of you
139139
~~~ sql
140140
CREATE SCHEDULE schedule_label
141141
FOR BACKUP INTO 's3://test/backups/schedule_test?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=x'
142-
WITH revision_history
143142
RECURRING '@daily';
144143
~~~
145144

@@ -155,9 +154,9 @@ Use the following process to create a schedule for a cluster-level backup of you
155154

156155
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 %}).
157156

158-
### Back up your app VC
157+
### Take a one-off backup of your app VC
159158

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.
161160

162161
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.
163162

@@ -175,79 +174,7 @@ Use the following process to take a one-off full backup of your app VC.
175174
BACKUP INTO 'external://backup_s3/app' AS OF SYSTEM TIME '-10s';
176175
~~~
177176

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 %}).
251178

252179
### Back up your system VC
253180

@@ -273,9 +200,9 @@ You can also back up your system VC to preserve metadata such as users and clust
273200

274201
### Restore a virtual cluster
275202

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:
277204

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.
279206

280207
{% include_cached copy-clipboard.html %}
281208
~~~ shell
@@ -291,6 +218,8 @@ If needed, you can restore backups to a new app VC with no user-created database
291218
RESTORE FROM LATEST IN 's3://bucket/path?AUTH=implicit';
292219
~~~
293220

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+
294223
## Configure cluster settings
295224

296225
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

Comments
 (0)