Skip to content

Commit

Permalink
Update for managed backups cloud 2.0 (#18919)
Browse files Browse the repository at this point in the history
  • Loading branch information
kathancox authored Sep 24, 2024
1 parent f92ef0c commit dde4862
Show file tree
Hide file tree
Showing 62 changed files with 664 additions and 695 deletions.
8 changes: 4 additions & 4 deletions src/current/_data/redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@
sources: ['change-data-capture.md']
versions: ['v20.2', 'v21.1']

- destination: take-and-restore-customer-owned-backups.md
sources: ['run-bulk-operations.md']
- destination: take-and-restore-self-managed-backups.md
sources: ['run-bulk-operations.md', 'take-and-restore-customer-owned-backups.md']
versions: ['cockroachcloud']

- destination: take-full-and-incremental-backups.md
Expand Down Expand Up @@ -493,8 +493,8 @@
sources: ['use-cloud-storage-for-bulk-operations.md']
versions: ['v22.2', 'v23.1']

- destination: use-managed-service-backups.md
sources: ['backups-page.md']
- destination: managed-backups.md
sources: ['backups-page.md', 'use-managed-service-backups.md']
versions: ['cockroachcloud']

- destination: use-userfile-storage.md
Expand Down
43 changes: 0 additions & 43 deletions src/current/_includes/cockroachcloud/backup-examples.md

This file was deleted.

4 changes: 2 additions & 2 deletions src/current/_includes/cockroachcloud/backup-types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CockroachDB supports two types of backups:

- **Managed-service backups**: Cockroach Labs takes automated backups of CockroachDB {{ site.data.products.serverless }} and CockroachDB {{ site.data.products.dedicated }} clusters that are stored in Cockroach Labs' cloud storage. {% if page.name != "use-managed-service-backups.md" %} See [Use Managed-Service Backups]({% link cockroachcloud/use-managed-service-backups.md %}) to learn more about the type and frequency of backups supported for both CockroachDB {{ site.data.products.cloud }} clusters. {% else %} {% endif %}
- {% if page.name == "take-and-restore-customer-owned-backups.md" %} **Customer-owned backups**: {% else %} **[Customer-owned backups]({% link cockroachcloud/take-and-restore-customer-owned-backups.md %})**: {% endif %} You can take manual backups and store them in your [cloud storage buckets]({% link {{site.current_cloud_version}}/use-cloud-storage.md %}) using the [`BACKUP`]({% link {{site.current_cloud_version}}/backup.md %}) statement. Customer-owned backups are supported in CockroachDB {{ site.data.products.serverless }}, CockroachDB {{ site.data.products.dedicated }}, and CockroachDB {{ site.data.products.core }}.
- **Managed backups**: Cockroach Labs takes automated backups of CockroachDB {{ site.data.products.cloud }} clusters that are stored in Cockroach Labs' cloud storage. {% if page.name != "managed-backups.md" %} Refer to [Managed Backups]({% link cockroachcloud/managed-backups.md %}) to learn more about the type and frequency of backups supported for both CockroachDB {{ site.data.products.cloud }} clusters. {% else %} {% endif %}
- {% if page.name == "take-and-restore-self-managed-backups.md" %} **Self-managed backups**: {% else %} **[Self-managed backups]({% link cockroachcloud/take-and-restore-self-managed-backups.md %})**: {% endif %} You can take manual backups and store them in your [cloud storage buckets]({% link {{site.current_cloud_version}}/use-cloud-storage.md %}) using the [`BACKUP`]({% link {{site.current_cloud_version}}/backup.md %}) statement. Self-managed backups are supported in CockroachDB {{ site.data.products.serverless }}, CockroachDB {{ site.data.products.dedicated }}, and CockroachDB {{ site.data.products.core }}.
65 changes: 65 additions & 0 deletions src/current/_includes/cockroachcloud/backups/cloud-api-get-put.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
You can use the [CockroachDB Cloud API]({% link cockroachcloud/cloud-api.md %}) to [view](#get-information-on-backup-settings) and [modify](#modify-backup-settings-on-a-cluster) managed backup settings in **{{ site.data.products.standard }} and {{ site.data.products.advanced }}** clusters.

{{site.data.alerts.callout_info}}
The [service account]({% link cockroachcloud/authorization.md %}#service-accounts) associated with the secret key must have the [Cluster Administrator]({% link cockroachcloud/authorization.md %}#cluster-administrator) role.
{{site.data.alerts.end}}

### Get information on backup settings

To retrieve information about a specific cluster, make a `GET` request to the `/v1/clusters/{cluster_id}/backups/config` endpoint.

{% include_cached copy-clipboard.html %}
~~~ shell
curl --request GET \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups/config \
--header 'Authorization: Bearer {secret_key}'
~~~

Set the following:

- `{cluster_id}` is the unique ID of the cluster. Use this ID when making API requests. You can find the cluster ID in the cluster's Cloud Console page. Find your cluster ID in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`. The ID should resemble `f78b7feb-b6cf-4396-9d7f-494982d7d81e`.
- `{secret_key}` is your API key. Refer to [API Access]({% link cockroachcloud/managing-access.md %}#api-access) for more details.

If the request was successful, the API will return details about the managed backup settings:

~~~json
{
"enabled": true,
"retention_days": 30,
"frequency_minutes": 240
}
~~~

- `{enabled}` shows whether managed backups are enabled or disabled.
- `{frequency_minutes}` is [how often](#frequency) the managed backup will run in minutes.
- `{retention_days}` is the number of days Cockroach Labs will [retain](#retention) the managed backup in storage.

### Modify backup settings on a cluster

{{site.data.alerts.callout_info}}
{% include cockroachcloud/backups/full-backup-setting-change.md %}
{{site.data.alerts.end}}

{% include cockroachcloud/backups/review-settings.md %}

To configure the frequency and retention of managed backups, send a `PUT` request to the `/v1/clusters/{cluster_id}/backups/config` endpoint.

{% include_cached copy-clipboard.html %}
~~~ shell
curl --request PUT \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups/config \
--header 'Authorization: Bearer {secret_key}' \
--data '{"enabled": true, "frequency_minutes": 30, "retention_days": 2}'
~~~

Set the following:

- `{cluster_id}` is the unique ID of the cluster. Use this ID when making API requests. You can find the cluster ID in the cluster's Cloud Console page. Find your cluster ID in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`. The ID should resemble `f78b7feb-b6cf-4396-9d7f-494982d7d81e`.
- `{enabled}` controls whether managed backups are enabled or disabled. If you are disabling managed backups, you cannot set backup frequency or retention. Possible values are: `true`, `false`.
- `{frequency_minutes}` determines [how often](#frequency) the managed backup will run in minutes. Possible values are: `5`, `10`, `15`, `30`, `60`, `240`, `1440`.
- `{retention_days}` sets the number of days Cockroach Labs will [retain](#retention) the managed backup in storage. You can change `retention_days` for the cluster **once** (whether in the Cloud API or [Cloud Console](#cloud-console)). Possible values are: `2`, `7`, `30`, `90`, `365`.

If `{retention_days}` has previously been modified (in the Cloud API or Cloud Console), you will receive the message "cluster already has a retention policy set, open a support ticket to change it". To modify the setting again, contact the [Cockroach Labs Support team]({% link {{site.current_cloud_version}}/support-resources.md %}).
- `{secret_key}` is your API key. Refer to [API Access]({% link cockroachcloud/managing-access.md %}#api-access) for more details.

If the request was successful, the client will receive an empty HTTP 200 OK status response.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- 5 minutes
- 10 minutes
- 30 minutes
- 1 hour (default)
- 4 hours
- 24 hours
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Following a change to the backup frequency or retention setting, the cluster will take a full backup immediately, which may impact CPU usage on the cluster. If you are disabling managed backups, the cluster will not take a backup following the change.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[_Managed backups_]({% link cockroachcloud/backup-and-restore-overview.md %}) are automated backups of CockroachDB {{ site.data.products.cloud }} clusters that are stored by Cockroach Labs in cloud storage. By default, Cockroach Labs takes and retains managed backups in all {{ site.data.products.cloud }} clusters. In {{ site.data.products.standard }} and {{ site.data.products.advanced }} clusters, you can adjust the default managed backup settings to meet your organization's disaster recovery requirements.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
When a cluster is deleted, Cockroach Labs will retain the managed backups for for the {% if page.name == "managed-backups.md" %} configured retention time, {% else %} [configured retention time]({% link cockroachcloud/managed-backups.md %}#managed-backup-settings), {% endif %}after which the backups will be deleted.

If a customer’s agreement with Cockroach Labs has terminated, all managed backups will be retained for a maximum of 30 days and then deleted. If a backup's retention time was set to **less** than 30 days, Cockroach Labs will retain the managed backups for the configured retention time, after which the backups will be deleted.

To restore a backup from a deleted cluster, you must contact the [Cockroach Labs Support team]({% link {{site.current_cloud_version}}/support-resources.md %}).
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- 2 days
- 7 days
- 30 days (default)
- 90 days
- 365 days

You'll be able to modify the retention setting once for a cluster. To modify the setting again, contact the [Cockroach Labs Support team]({% link {{site.current_cloud_version}}/support-resources.md %}).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Before modifying cluster backup settings, review details on backup settings for [{{ site.data.products.standard }} and {{ site.data.products.advanced }} clusters](#standard-and-advanced-clusters).
2 changes: 1 addition & 1 deletion src/current/_includes/releases/v21.2/v21.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Area | Topic | Description
Cockroach University | **New Serverless course** | [Introduction to Serverless Databases and CockroachDB {{ site.data.products.serverless }}](https://university.cockroachlabs.com/courses/course-v1:crl+intro-to-serverless+self-paced/about) teaches you the core concepts behind serverless databases and gives you the tools you need to get started with CockroachDB {{ site.data.products.serverless }}.
Cockroach University | **New Schema Design Course** | [Foundations of Schema Design in CockroachDB](https://university.cockroachlabs.com/courses/course-v1:crl+foundations-schema-design-cockroachdb+self-paced/about) teaches you CockroachDB's rich data types and the best practices and anti-patterns to consider when designing schema for CockroachDB.
Cockroach University | **New Node.js Course** | [Fundamentals of CockroachDB for Node.js Developers](https://university.cockroachlabs.com/courses/course-v1:crl+fundamentals-of-crdb-for-nodejs-devs+self-paced/about) guides you through building a full-stack vehicle-sharing app in Typescript using Node.js with TypeORM and a <a href="https://cockroachlabs.cloud/signup?referralId=docs_crdb_release_notes" rel="noopener" target="_blank">CockroachCloud Free</a> cluster as the backend.
Docs | **CockroachDB Cloud Guidance** | Added Node.js, Go, Python, and Java sample app code and connection guidance to the [CockroachDB {{ site.data.products.serverless }} Quickstart](https://www.cockroachlabs.com/docs/cockroachcloud/quickstart), as well as docs explaining the [CockroachDB {{ site.data.products.serverless }} Architecture](https://www.cockroachlabs.com/docs/cockroachcloud/architecture), important concepts for [planning/managing a Serverless cluster](https://www.cockroachlabs.com/docs/cockroachcloud/plan-your-cluster) (e.g., request units, cluster scaling), and how to run [customer-owned backups on CockroachDB {{ site.data.products.dedicated }} and CockroachDB {{ site.data.products.serverless }} clusters](https://www.cockroachlabs.com/docs/cockroachcloud/take-and-restore-customer-owned-backups).
Docs | **CockroachDB Cloud Guidance** | Added Node.js, Go, Python, and Java sample app code and connection guidance to the [CockroachDB {{ site.data.products.serverless }} Quickstart](https://www.cockroachlabs.com/docs/cockroachcloud/quickstart), as well as docs explaining the [CockroachDB {{ site.data.products.serverless }} Architecture](https://www.cockroachlabs.com/docs/cockroachcloud/architecture), important concepts for [planning/managing a Serverless cluster](https://www.cockroachlabs.com/docs/cockroachcloud/plan-your-cluster) (e.g., request units, cluster scaling), and how to run [customer-owned backups on CockroachDB {{ site.data.products.dedicated }} and CockroachDB {{ site.data.products.serverless }} clusters](https://www.cockroachlabs.com/docs/cockroachcloud/take-and-restore-self-managed-backups).
Docs | **Multi-Region Guidance** | Added docs on [transitioning to the new multi-region SQL abstractions](https://www.cockroachlabs.com/docs/v21.2/migrate-to-multiregion-sql) from the legacy zone-configuration-based workflows, and on [data domiciling in multi-region clusters](https://www.cockroachlabs.com/docs/v21.2/data-domiciling).
Docs | **Performance Tuning Recipes** | Added [solutions for common performance issues](https://www.cockroachlabs.com/docs/v21.2/performance-recipes).
Docs | **New Developer Tutorials** | Added tutorials on [using Google Cloud Run](https://www.cockroachlabs.com/docs/v21.2/deploy-app-gcr) to deploy a containerized Django application and [using the Alembic schema migration module](https://www.cockroachlabs.com/docs/v21.2/alembic) with a simple Python application.
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/releases/v22.1/v22.1.0-alpha.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ Release Date: March 7, 2022
- The memory representation of [`DECIMAL`](https://www.cockroachlabs.com/docs/v22.1/decimal) datums has been optimized to save space, avoid heap allocations, and eliminate indirection. This increases the speed of `DECIMAL` arithmetic and aggregation by up to 20% on large data sets. [#74590][#74590]
- `RESTORE` operations in [Serverless clusters](https://www.cockroachlabs.com/docs/cockroachcloud/create-a-serverless-cluster) now explicitly ask the host cluster to distribute data more evenly. [#75105][#75105]
- `IMPORT`, `CREATE`, `INDEX`, and other [bulk ingestion jobs](https://www.cockroachlabs.com/docs/cockroachcloud/take-and-restore-customer-owned-backups) run on Serverless clusters now collaborate with the host cluster to spread ingested data more during ingest. [#75105][#75105]
- `IMPORT`, `CREATE`, `INDEX`, and other [bulk ingestion jobs](https://www.cockroachlabs.com/docs/cockroachcloud/take-and-restore-self-managed-backups) run on Serverless clusters now collaborate with the host cluster to spread ingested data more during ingest. [#75105][#75105]
- The `covar_pop` [aggregate function](https://www.cockroachlabs.com/docs/v22.1/functions-and-operators#aggregate-functions) is now evaluated more efficiently in a distributed setting. [#73062][#73062]
- Queries using [`NOT expr`](https://www.cockroachlabs.com/docs/v22.1/scalar-expressions) syntax can now be evaluated faster in some cases. [#75058][#75058]
- The `regr_sxx`, `regr_sxy`, `regr_syy` aggregate functions are now evaluated more efficiently in a distributed setting. [#75619][#75619]
Expand Down
4 changes: 2 additions & 2 deletions src/current/_includes/sidebar-data-cockroachcloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@
{
"title": "Take and Restore Customer-Owned Backups",
"urls": [
"/cockroachcloud/take-and-restore-customer-owned-backups.html"
"/cockroachcloud/take-and-restore-self-managed-backups.html"
]
},
{
"title": "Use Managed-Service Backups",
"urls": [
"/cockroachcloud/use-managed-service-backups.html"
"/cockroachcloud/managed-backups.html"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/current/_includes/v21.2/sidebar-data/manage.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@
{
"title": "Take and Restore Customer-Owned Backups",
"urls": [
"/cockroachcloud/take-and-restore-customer-owned-backups.html"
"/cockroachcloud/take-and-restore-self-managed-backups.html"
]
},
{
"title": "Use Managed-Service Backups",
"urls": [
"/cockroachcloud/use-managed-service-backups.html"
"/cockroachcloud/managed-backups.html"
]
}
]
Expand Down
4 changes: 2 additions & 2 deletions src/current/_includes/v22.1/sidebar-data/manage.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@
{
"title": "Take and Restore Customer-Owned Backups",
"urls": [
"/cockroachcloud/take-and-restore-customer-owned-backups.html"
"/cockroachcloud/take-and-restore-self-managed-backups.html"
]
},
{
"title": "Use Managed-Service Backups",
"urls": [
"/cockroachcloud/use-managed-service-backups.html"
"/cockroachcloud/managed-backups.html"
]
}
]
Expand Down
Loading

0 comments on commit dde4862

Please sign in to comment.