Skip to content

Commit 935ee08

Browse files
Restructured section
Restructured backup and dr section for clarity and thoroughness
1 parent 90d91b5 commit 935ee08

File tree

1 file changed

+33
-16
lines changed

1 file changed

+33
-16
lines changed

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

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,45 @@ When connected to a virtual cluster from the DB Console, metrics which measure S
118118

119119
When cluster virtualization is enabled, [backup]({% link {{ page.version.version }}/backup.md %}) and [restore]({% link {{ page.version.version }}/restore.md %}) commands are scoped to the virtual cluster by default.
120120

121-
### Back up a virtual cluster
121+
Cockroach Labs recommends that you regularly [back up]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#full-backups) your _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. If needed, you can [restore](#restore-a-virtual-cluster) these backups to a new app VC. Use the following process to back up your app VC.
122122

123-
To back up a virtual cluster:
123+
1. [Connect](#connect-to-a-virtual-cluster) to the app VC as a user with the `admin` role on the app VC:
124124

125-
1. [Connect to the virtual cluster](#connect-to-a-virtual-cluster) you want to back up as a user with the `admin` role on the virtual cluster.
126-
1. [Back up the cluster]({% link {{ page.version.version }}/backup.md %}). Only the virtual cluster's data and settings are included in the backup, and data and settings for other virtual clusters or for the system virtual cluster is omitted.
125+
{% include_cached copy-clipboard.html %}
126+
~~~ shell
127+
cockroach sql --url \
128+
"postgresql://root@{primary node IP or hostname}:26257?options=-ccluster={app_virtual_cluster_name}&sslmode=verify-full" \
129+
--certs-dir "certs"
130+
~~~
127131

128-
For details about restoring a backup of a virtual cluster, refer to [Restore a virtual cluster](#restore-a-virtual-cluster).
132+
1. [Perform a full backup]({% link {{ page.version.version }}/backup.md %}#back-up-a-cluster):
129133

130-
### Back up the entire cluster
134+
{% include_cached copy-clipboard.html %}
135+
~~~ sql
136+
BACKUP INTO 'external://backup_s3' AS OF SYSTEM TIME '-10s';
137+
~~~
131138

132-
To back up the entire CockroachDB cluster, including all virtual clusters and the system virtual cluster:
139+
{% include {{ page.version.version }}/backups/backup-storage-collision.md %}
133140

134-
1. [Connect to the system virtual cluster](#connect-to-the-system-virtual-cluster) as a user with the `admin` role on the system virtual cluster.
135-
1. [Back up the cluster]({% link {{ page.version.version }}/backup.md %}), and include the `INCLUDE_ALL_SECONDARY_TENANTS` flag in the `BACKUP` command. All virtual clusters and the system virtual cluster are included in the backup.
141+
You can also back up your system VC to preserve metadata such as users and cluster settings. Use the following process to back up your system VC.
142+
143+
1. [Connect](#connect-to-the-system-virtual-cluster) to the system VC as a user with the `admin` role on the system VC:
144+
145+
{% include_cached copy-clipboard.html %}
146+
~~~ shell
147+
cockroach sql --url \
148+
"postgresql://root@{primary node IP or hostname}:26257?options=-ccluster=system&sslmode=verify-full" \
149+
--certs-dir "certs"
150+
~~~
151+
152+
1. [Perform a full backup]({% link {{ page.version.version }}/backup.md %}#back-up-a-cluster):
153+
154+
{% include_cached copy-clipboard.html %}
155+
~~~ sql
156+
BACKUP INTO 'external://backup_s3' AS OF SYSTEM TIME '-10s';
157+
~~~
158+
159+
{% include {{ page.version.version }}/backups/backup-storage-collision.md %}
136160

137161
### Restore a virtual cluster
138162

@@ -147,13 +171,6 @@ To restore only a virtual cluster:
147171
1. [Connect to the destination virtual cluster](#connect-to-a-virtual-cluster) as a user with the `admin` role on the virtual cluster.
148172
1. [Restore the cluster]({% link {{ page.version.version }}/restore.md %}). Only the virtual cluster's data and settings are restored.
149173
150-
### Restore the entire cluster
151-
152-
To restore the entire CockroachDB cluster, including all virtual clusters and the system virtual cluster:
153-
154-
1. [Connect to the destination system virtual cluster](#connect-to-the-system-virtual-cluster) as a user with the `admin` role on the system virtual cluster.
155-
1. [Restore the cluster]({% link {{ page.version.version }}/restore.md %}) from a backup that included the the `INCLUDE_ALL_SECONDARY_VIRTUAL_CLUSTERS` flag. All virtual clusters and the system virtual cluster are restored.
156-
157174
## Configure cluster settings
158175
159176
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)