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/work-with-virtual-clusters.md
+33-16Lines changed: 33 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,21 +118,45 @@ When connected to a virtual cluster from the DB Console, metrics which measure S
118
118
119
119
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.
120
120
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.
122
122
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:
124
124
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
+
~~~
127
131
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):
129
133
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
+
~~~
131
138
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 %}
133
140
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 %}
136
160
137
161
### Restore a virtual cluster
138
162
@@ -147,13 +171,6 @@ To restore only a virtual cluster:
147
171
1. [Connect to the destination virtual cluster](#connect-to-a-virtual-cluster) as a user with the `admin` role on the virtual cluster.
148
172
1. [Restore the cluster]({% link {{ page.version.version }}/restore.md %}). Only the virtual cluster's data and settings are restored.
149
173
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
-
157
174
## Configure cluster settings
158
175
159
176
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