-
Notifications
You must be signed in to change notification settings - Fork 477
Restructured DR backup section for clarity and thoroughness #20873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
935ee08
9ccf343
295db29
2b3fc7e
c26d7c0
3af9333
5151083
01b6081
d34724b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | |
|
|
||
| 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. | ||
|
|
||
| ### Back up a virtual cluster | ||
peachdawnleach marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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. | ||
|
||
|
|
||
| To back up a virtual cluster: | ||
| 1. [Connect](#connect-to-a-virtual-cluster) to the app VC as a user with the `admin` role on the app VC: | ||
|
||
|
|
||
| 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. | ||
| 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. | ||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| cockroach sql --url \ | ||
| "postgresql://root@{primary node IP or hostname}:26257?options=-ccluster={app_virtual_cluster_name}&sslmode=verify-full" \ | ||
| --certs-dir "certs" | ||
| ~~~ | ||
|
|
||
| For details about restoring a backup of a virtual cluster, refer to [Restore a virtual cluster](#restore-a-virtual-cluster). | ||
| 1. [Perform a full backup]({% link {{ page.version.version }}/backup.md %}#back-up-a-cluster): | ||
|
||
|
|
||
| ### Back up the entire cluster | ||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ sql | ||
| BACKUP INTO 'external://backup_s3' AS OF SYSTEM TIME '-10s'; | ||
|
||
| ~~~ | ||
|
|
||
| To back up the entire CockroachDB cluster, including all virtual clusters and the system virtual cluster: | ||
| {% include {{ page.version.version }}/backups/backup-storage-collision.md %} | ||
msbutler marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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. | ||
| 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. | ||
| 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. | ||
|
||
|
|
||
| 1. [Connect](#connect-to-the-system-virtual-cluster) to the system VC as a user with the `admin` role on the system VC: | ||
|
||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| cockroach sql --url \ | ||
| "postgresql://root@{primary node IP or hostname}:26257?options=-ccluster=system&sslmode=verify-full" \ | ||
| --certs-dir "certs" | ||
| ~~~ | ||
|
|
||
| 1. [Perform a full backup]({% link {{ page.version.version }}/backup.md %}#back-up-a-cluster): | ||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ sql | ||
| BACKUP INTO 'external://backup_s3' AS OF SYSTEM TIME '-10s'; | ||
|
||
| ~~~ | ||
|
|
||
| {% include {{ page.version.version }}/backups/backup-storage-collision.md %} | ||
|
|
||
| ### Restore a virtual cluster | ||
|
|
||
|
|
@@ -147,13 +171,6 @@ To restore only a virtual cluster: | |
| 1. [Connect to the destination virtual cluster](#connect-to-a-virtual-cluster) as a user with the `admin` role on the virtual cluster. | ||
| 1. [Restore the cluster]({% link {{ page.version.version }}/restore.md %}). Only the virtual cluster's data and settings are restored. | ||
|
|
||
| ### Restore the entire cluster | ||
peachdawnleach marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| To restore the entire CockroachDB cluster, including all virtual clusters and the system virtual cluster: | ||
|
|
||
| 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. | ||
| 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. | ||
|
|
||
msbutler marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Configure cluster settings | ||
|
|
||
| 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. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: i think this line can removed. i don't think it adds much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1