Skip to content
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

Update for managed backups cloud 2.0 #18919

Merged
merged 10 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/current/_includes/cockroachcloud/backup-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ INTO 's3://{BUCKET NAME}/{PATH}?AWS_ACCESS_KEY_ID={KEY ID}&AWS_SECRET_ACCESS_KEY
AS OF SYSTEM TIME '-10s';
~~~

To resolve database or table naming conflicts during a restore, see [Troubleshooting naming conflicts]({% link cockroachcloud/use-managed-service-backups.md %}#troubleshooting).
To resolve database or table naming conflicts during a restore, see [Troubleshooting naming conflicts]({% link cockroachcloud/managed-backups.md %}#troubleshooting).
kathancox marked this conversation as resolved.
Show resolved Hide resolved
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" %} **Managed-service backups**: {% else %} **[Managed-service 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. Managed-service backups are supported in CockroachDB {{ site.data.products.serverless }}, CockroachDB {{ site.data.products.dedicated }}, and CockroachDB {{ site.data.products.core }}.
kathancox marked this conversation as resolved.
Show resolved Hide resolved
59 changes: 59 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,59 @@
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 backups in **{{ site.data.products.standard }} and {{ site.data.products.advanced }}** clusters.
kathancox marked this conversation as resolved.
Show resolved Hide resolved

{{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.
kathancox marked this conversation as resolved.
Show resolved Hide resolved

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. Possible values are: `5`, `10`, `15`, `30`, `60`, `240`, `1440`.
kathancox marked this conversation as resolved.
Show resolved Hide resolved
- `{retention_days}` is the number of days Cockroach Labs will [retain](#retention) the managed backup in storage.

### Modify backup settings on a cluster

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 run or are disabled. If you are disabling managed backups, you cannot set backup frequency or retention. Possible values are: `true`, `false`.
kathancox marked this conversation as resolved.
Show resolved Hide resolved
- `{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](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/support-resources).
kathancox marked this conversation as resolved.
Show resolved Hide resolved
- `{secret_key}`: is your API key. Refer to [API Access]({% link cockroachcloud/managing-access.md %}#api-access) for more details.
kathancox marked this conversation as resolved.
Show resolved Hide resolved

If the request was successful, the client will not receive a response payload.
kathancox marked this conversation as resolved.
Show resolved Hide resolved
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 @@
[_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,3 @@
Once a cluster is deleted, Cockroach Labs retains the backups for the {% if page.name == "managed-backups.md" %} configured retention time. {% else %} [configured retention time]({% link cockroachcloud/managed-backups.md %}#managed-backup-settings). {% endif %} If an [organization]({% link cockroachcloud/managing-access.md %}#manage-your-organizations) is deleted, managed backups will be retained for a maximum of 30 days. If a backup's retention time was set to **less** than 30 days in {{ site.data.products.standard }} and {{ site.data.products.advanced }} clusters, the backup will be retained for the set retention time.

To restore a backup from a deleted cluster, you must contact the [Cockroach Labs Support team](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/support-resources).
kathancox marked this conversation as resolved.
Show resolved Hide resolved
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](https://www.cockroachlabs.com/docs/{{site.current_cloud_version}}/support-resources).
kathancox marked this conversation as resolved.
Show resolved Hide resolved
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
2 changes: 1 addition & 1 deletion src/current/_includes/v22.2/backups/support-products.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Supported products

The feature described on this page is available in **CockroachDB {{ site.data.products.dedicated }}**, **CockroachDB {{ site.data.products.serverless }}**, and **CockroachDB {{ site.data.products.core }}** clusters when you are running [customer-owned backups](backup-and-restore-overview.html#cockroachdb-backup-types). For a full list of features, see [Backup and restore product support](backup-and-restore-overview.html#backup-and-restore-product-support).
The feature described on this page is available in **CockroachDB {{ site.data.products.dedicated }}**, **CockroachDB {{ site.data.products.serverless }}**, and **CockroachDB {{ site.data.products.core }}** clusters when you are running [self-managed backups](backup-and-restore-overview.html#cockroachdb-backup-types). For a full list of features, see [Backup and restore product support](backup-and-restore-overview.html#backup-and-restore-product-support).
4 changes: 2 additions & 2 deletions src/current/_includes/v22.2/sidebar-data/manage.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
{
"title": "Managed-Service Backups",
"urls": [
"/cockroachcloud/use-managed-service-backups.html"
"/cockroachcloud/managed-backups.html"
]
},
{
Expand All @@ -117,7 +117,7 @@
{
"title": "Take and Restore Customer-Owned Backups on CockroachDB Cloud",
"urls": [
"/cockroachcloud/take-and-restore-customer-owned-backups.html"
"/cockroachcloud/take-and-restore-self-managed-backups.html"
]
},
{
Expand Down
Loading