Skip to content

Commit

Permalink
locality-aware backup changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kathancox committed Feb 2, 2024
1 parent 8ed1dc0 commit b75f611
Show file tree
Hide file tree
Showing 17 changed files with 135 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A successful locality-aware backup job requires that each node in the cluster has access to each storage location. This is because any node in the cluster can claim the job and become the [_coordinator_ ](backup-architecture.html#job-creation-phase) node.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CockroachDB {{ site.data.products.serverless }} clusters operate with a [different architecture](https://www.cockroachlabs.com/docs/cockroachcloud/architecture#cockroachdb-serverless) compared to CockroachDB {{ site.data.products.core }} and CockroachDB {{ site.data.products.dedicated }} clusters. These architectural differences have implications for how locality-aware backups can run. Serverless clusters will scale resources depending on whether they are actively in use, which means that it is less likely to have a SQL pod available in every locality. As a result, Serverless clusters are more likely to have ranges that do not match with any of the cluster's localities, which can lead to more ranges backed up to a storage bucket in a different locality. You should consider this as you plan a backup strategy that must comply with [data domiciling](data-domiciling.html) requirements.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CockroachDB {{ site.data.products.serverless }} clusters operate with a [different architecture]({% link cockroachcloud/architecture.md %}#cockroachdb-serverless) compared to CockroachDB {{ site.data.products.core }} and CockroachDB {{ site.data.products.dedicated }} clusters. These architectural differences have implications for how locality-aware backups can run. Serverless clusters will scale resources depending on whether they are actively in use, which means that it is less likely to have a SQL pod available in every locality. As a result, Serverless clusters are more likely to have ranges that do not match with any of the cluster's localities, which can lead to more ranges backed up to a storage bucket in a different locality. You should consider this as you plan a backup strategy that must comply with [data domiciling]({% link v23.1/data-domiciling.md %}) requirements.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CockroachDB {{ site.data.products.serverless }} clusters operate with a [different architecture]({% link cockroachcloud/architecture.md %}#cockroachdb-serverless) compared to CockroachDB {{ site.data.products.core }} and CockroachDB {{ site.data.products.dedicated }} clusters. These architectural differences have implications for how locality-aware backups can run. Serverless clusters will scale resources depending on whether they are actively in use, which means that it is less likely to have a SQL pod available in every locality. As a result, Serverless clusters are more likely to have ranges that do not match with any of the cluster's localities, which can lead to more ranges backed up to a storage bucket in a different locality. You should consider this as you plan a backup strategy that must comply with [data domiciling]({% link v23.2/data-domiciling.md %}) requirements.
10 changes: 7 additions & 3 deletions src/current/cockroachcloud/serverless-unsupported-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ You can't configure [alerts on changefeeds](https://www.cockroachlabs.com/docs/{

## Backups

CockroachDB {{ site.data.products.serverless }} only support automated full backups. Automated [incremental](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/take-full-and-incremental-backups) and [revision history](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/take-backups-with-revision-history-and-restore-from-a-point-in-time) backups are not supported. However, [user managed incremental and revision history backups]({% link cockroachcloud/take-and-restore-customer-owned-backups.md %}#back-up-data) using user provided storage locations are supported.
CockroachDB {{ site.data.products.serverless }} clusters only support automated full backups. Automated [incremental](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/take-full-and-incremental-backups) and [revision history](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/take-backups-with-revision-history-and-restore-from-a-point-in-time) backups are not supported. However, you can take manual [incremental and revision history backups]({% link cockroachcloud/take-and-restore-customer-owned-backups.md %}#back-up-data) to your own [cloud storage location](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/use-cloud-storage).

Automated database and table level backups are not supported in CockroachDB {{ site.data.products.serverless }}. However, [user managed database and table level backups]({% link cockroachcloud/take-and-restore-customer-owned-backups.md %}#back-up-data) using user provided storage locations are supported.
Automated database and table level backups are not supported in CockroachDB {{ site.data.products.serverless }}. However, you can take manual [database and table level backups]({% link cockroachcloud/take-and-restore-customer-owned-backups.md %}#back-up-data) to your own [cloud storage location](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/use-cloud-storage).

Both CockroachDB {{ site.data.products.serverless }} and CockroachDB {{ site.data.products.dedicated }} clusters do not support automated [locality-aware backups](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/take-and-restore-locality-aware-backups). However, user managed locality-aware backups using user provided storage locations are supported in CockroachDB {{ site.data.products.serverless }}, CockroachDB {{ site.data.products.dedicated }}, and CockroachDB {{ site.data.products.core }} clusters. That is, you need to configure and manage your own locality-aware backups.
Both CockroachDB {{ site.data.products.serverless }} and CockroachDB {{ site.data.products.dedicated }} clusters do not support automated [locality-aware backups](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/take-and-restore-locality-aware-backups). However, you can take manual locality-aware backups to your own [cloud storage location](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/use-cloud-storage).

{{site.data.alerts.callout_info}}
{% include v23.2/backups/serverless-locality-aware.md %}
{{site.data.alerts.end}}

## Adding and removing regions

Expand Down
3 changes: 2 additions & 1 deletion src/current/cockroachcloud/use-managed-service-backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Cockroach Labs runs [full cluster backups](https://www.cockroachlabs.com/docs/{{

- By default, full backups are retained for 30 days. However, if you delete the backup schedule manually you will not be able to restore from these backups.
- Once a cluster is deleted, Cockroach Labs retains the full backups for 30 days and incremental backups for 7 days.
- Backups are stored in the same region that a [single-region cluster]({% link cockroachcloud/plan-your-cluster.md %}#cluster-configuration) is running in, or the primary region of a [multi-region cluster](plan-your-cluster.html#multi-region-clusters). Every backup will be stored entirely in a single region, which is chosen at random from the list of cluster regions at the time of cluster creation. This region will be used indefinitely.

</section>

Expand All @@ -30,7 +31,7 @@ Cockroach Labs runs [full cluster backups](https://www.cockroachlabs.com/docs/{{

- By default, full backups are retained for 30 days, while incremental backups are retained for 7 days. However, if you delete the backup schedule manually or enable [CMEK]({% link cockroachcloud/cmek.md %}) on the cluster, this will affect the availability of managed backups. Refer to the [CockroachDB Cloud FAQs]({% link cockroachcloud/frequently-asked-questions.md %}#who-is-responsible-for-backup) for more detail.
- Once a cluster is deleted, Cockroach Labs retains the full backups for 30 days and incremental backups for 7 days.
- Backups are stored in the same region that a [single-region cluster]({% link cockroachcloud/plan-your-cluster.md %}#cluster-configuration) is running in or the primary region of a [multi-region cluster](plan-your-cluster.html#multi-region-clusters).
- Backups are stored in the same region that a [single-region cluster]({% link cockroachcloud/plan-your-cluster.md %}#cluster-configuration) is running in, or the primary region of a [multi-region cluster](plan-your-cluster.html#multi-region-clusters). Every backup will be stored entirely in a single region, which is chosen at random from the list of cluster regions at the time of cluster creation. This region will be used indefinitely.

{{site.data.alerts.callout_info}}
You cannot restore a backup of a multi-region database into a single-region database.
Expand Down
12 changes: 6 additions & 6 deletions src/current/v22.2/backup-and-restore-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,36 @@ For an explanation of how a backup works, see [Backup Architecture](backup-archi

## CockroachDB backup types

{% include cockroachcloud/backup-types.md %}
{% include cockroachcloud/backup-types.md %}

## Backup and restore product support

This table outlines the level of product support for backup and restore features in CockroachDB. See each of the pages linked in the table for usage examples:

Backup / Restore | Description | Product Support
Backup / Restore | Description | Product Support
------------------+--------------+-----------------
[Full backup](take-full-and-incremental-backups.html) | An un-replicated copy of your cluster, database, or table's data. A full backup is the base for any further backups. | <ul><li>All products (Enterprise license not required)</li><ul>
[Incremental backup](take-full-and-incremental-backups.html) | A copy of the changes in your data since the specified base backup (either a full backup or a full backup plus an incremental backup). | <ul><li>CockroachDB {{ site.data.products.serverless }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.dedicated }} — managed-service backups and customer-owned backups</li><li>CockroachDB {{ site.data.products.core }} with an [{{ site.data.products.enterprise }} license](enterprise-licensing.html)</li><ul>
[Scheduled backup](manage-a-backup-schedule.html) | A schedule for periodic backups. | <ul><li>CockroachDB {{ site.data.products.serverless }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.dedicated }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.core }} with an [{{ site.data.products.enterprise }} license](enterprise-licensing.html)</li><ul>
[Backups with revision history](take-backups-with-revision-history-and-restore-from-a-point-in-time.html) | A backup with revision history allows you to back up every change made within the garbage collection period leading up to and including the given timestamp. | <ul><li>CockroachDB {{ site.data.products.serverless }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.dedicated }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.core }} with an [{{ site.data.products.enterprise }} license](enterprise-licensing.html)</li><ul>
[Point-in-time restore](take-backups-with-revision-history-and-restore-from-a-point-in-time.html) | A restore from an arbitrary point in time within the revision history of a backup. | <ul><li>CockroachDB {{ site.data.products.serverless }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.dedicated }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.core }} with an [{{ site.data.products.enterprise }} license](enterprise-licensing.html)</li><ul>
[Encrypted backup and restore](take-and-restore-encrypted-backups.html) | An encrypted backup using a KMS or passphrase. | <ul><li>CockroachDB {{ site.data.products.serverless }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.dedicated }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.core }} with an [{{ site.data.products.enterprise }} license](enterprise-licensing.html)</li><ul>
[Locality-aware backup and restore](take-and-restore-locality-aware-backups.html) | A backup where each node writes files only to the backup destination that matches the node locality configured at node startup. | <ul><li>CockroachDB {{ site.data.products.serverless }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.dedicated }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.core }} with an [{{ site.data.products.enterprise }} license](enterprise-licensing.html)</li><ul>
[Locality-aware backup and restore](take-and-restore-locality-aware-backups.html) | A backup where each node writes files to the backup destination that matches the node locality configured at node startup. | <ul><li>CockroachDB {{ site.data.products.serverless }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.dedicated }} — customer-owned backups</li><li>CockroachDB {{ site.data.products.core }} with an [{{ site.data.products.enterprise }} license](enterprise-licensing.html)</li><ul>

{% include {{ page.version.version }}/backups/scheduled-backups-tip.md %}

## Backup and restore SQL statements

The following table outlines SQL statements you can use to create, configure, pause, and show backup and restore jobs:

SQL Statement | Description
SQL Statement | Description
----------------|---------------------------------------------------------------------------------------------
[`BACKUP`](backup.html) | Create full and incremental backups.
[`SHOW JOBS`](show-jobs.html) | Show a list of all running jobs or show the details of a specific job by its `job ID`.
[`PAUSE JOB`](pause-job.html) | Pause a backup or restore job with its `job ID`.
[`RESUME JOB`](resume-job.html) | Resume a backup or restore job with its `job ID`.
[`RESUME JOB`](resume-job.html) | Resume a backup or restore job with its `job ID`.
[`CANCEL JOB`](cancel-job.html) | Cancel a backup or restore job with its `job ID`.
[`SHOW BACKUP`](show-backup.html) | Show a backup's details at the [backup collection's](take-full-and-incremental-backups.html#backup-collections) storage location.
[`SHOW BACKUP`](show-backup.html) | Show a backup's details at the [backup collection's](take-full-and-incremental-backups.html#backup-collections) storage location.
[`RESTORE`](restore.html) | Restore full and incremental backups.
[`ALTER BACKUP`](alter-backup.html) | Add a new [KMS encryption key](take-and-restore-encrypted-backups.html#use-key-management-service) to an encrypted backup.
[`CREATE SCHEDULE FOR BACKUP`](create-schedule-for-backup.html) | Create a schedule for periodic backups.
Expand Down
Loading

0 comments on commit b75f611

Please sign in to comment.