Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
### 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.
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}'
--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`.
- `{cluster_id}` is the unique ID of the cluster. This ID is written in a UUID format similar to `f78b7feb-b6cf-4396-9d7f-494982d7d81e` and is returned by a [GET request against the `/v1/clusters` endpoint]({% link cockroachcloud/cloud-api.md %}#list-all-clusters-in-an-organization). You can also find the cluster ID in the Cloud Console, in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`.
- `{secret_key}` is your API key. Refer to [API Access]({% link cockroachcloud/managing-access.md %}#api-access) for more details.

If the request is successful, the API will return details about the managed backup settings:
Expand All @@ -36,19 +36,19 @@ If the request is successful, the API will return details about the managed back

{% 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.
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}' \
--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`.
- `{cluster_id}` is the unique ID of the cluster. This ID is written in a UUID format similar to `f78b7feb-b6cf-4396-9d7f-494982d7d81e` and is returned by a [GET request against the `/v1/clusters` endpoint]({% link cockroachcloud/cloud-api.md %}#list-all-clusters-in-an-organization). You can also find the cluster ID in the Cloud Console, in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`.
- `{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` (4 hours), `1440` (24 hours).
- `{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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To view a list of managed backups on a cluster with timestamps and their respect
~~~ shell
curl --request GET \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups \
--header 'Authorization: Bearer {secret_key}' \
--header "Authorization: Bearer {secret_key}" \
~~~

If the request is successful, the client recieves a JSON response listing backups with their unique `{id}`. The `{as_of_time}` timestamp describes the system time of the cluster when the backup was created:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ To restore a cluster to a recent managed backup, send a `POST` request to the `/
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{cluster_id}"
"source_cluster_id": "{cluster_id}",
"type": "CLUSTER"
}'
~~~
Expand All @@ -36,7 +36,7 @@ By default, the restore job uses the most recent backup stored within the last 7
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"backup_id": "example-2d25-4a64-8172-28af7a0d41cc",
Expand All @@ -50,7 +50,7 @@ To restore a cluster backup into a different cluster, ensure that the destinatio
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{source_cluster_id}",
Expand Down Expand Up @@ -83,10 +83,10 @@ To restore one or more databases from a cluster's managed backup, send a `POST`
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{cluster_id}"
"source_cluster_id": "{cluster_id}",
"type": "DATABASE",
"objects": [
{
Expand All @@ -104,10 +104,10 @@ By default, the database is restored into the original database name from the ma
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{cluster_id}"
"source_cluster_id": "{cluster_id}",
"type": "DATABASE",
"objects": [
{
Expand All @@ -125,7 +125,7 @@ To restore from a specific backup rather than the most recently created managed
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"backup_id": "example-2d25-4a64-8172-28af7a0d41cc",
Expand All @@ -134,7 +134,7 @@ curl --request POST \
{
"database": "tpcc"
}
],
]
}'
~~~

Expand All @@ -143,7 +143,7 @@ To restore a database from a source cluster's managed backup into a different cl
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{source_cluster_id}",
Expand All @@ -152,7 +152,7 @@ curl --request POST \
{
"database": "tpcc"
}
],
]
}'
~~~

Expand All @@ -178,10 +178,10 @@ To restore a one or more tables from a cluster's managed backup, send a `POST` r
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{cluster_id}"
"source_cluster_id": "{cluster_id}",
"type": "TABLE",
"objects": [
{
Expand All @@ -203,10 +203,10 @@ By default, the table is restored into the original database name from the manag
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{cluster_id}"
"source_cluster_id": "{cluster_id}",
"type": "TABLE",
"objects": [
{
Expand All @@ -231,7 +231,7 @@ To restore from a specific backup rather than the most recently created managed
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"backup_id": "example-2d25-4a64-8172-28af7a0d41cc",
Expand All @@ -251,7 +251,7 @@ To restore a table from a source cluster's managed backup into a different clust
{% include_cached copy-clipboard.html %}
~~~ shell
curl --request POST \
--url 'https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores' \
--url https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores \
--header "Authorization: Bearer {secret_key}" \
--json '{
"source_cluster_id": "{source_cluster_id}",
Expand Down Expand Up @@ -294,7 +294,7 @@ To view the status of a restore job using the cloud API, send a `GET` request to
~~~ shell
curl --request GET \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores/{restore_id} \
--header 'Authorization: Bearer {secret_key}' \
--header "Authorization: Bearer {secret_key}"
~~~

If the request is successful, the client recieves a response containing JSON describing the status of the specified request operation:
Expand Down
10 changes: 5 additions & 5 deletions src/current/cockroachcloud/aws-privatelink.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ To [add a private endpoint trusted owner](https://www.cockroachlabs.com/docs/api
~~~ shell
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners \
--header 'Authorization: Bearer {bearer_token' \
--header 'content-type: application/json' \
--header "Authorization: Bearer {bearer_token}" \
--header "content-type: application/json" \
--data '{"external_owner_id":"{aws_account_id}","type":"AWS_ACCOUNT_ID"}'
~~~

Expand All @@ -101,7 +101,7 @@ To [list private endpoint trusted owners](https://www.cockroachlabs.com/docs/api
~~~ shell
curl --request GET \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners \
--header 'Authorization: Bearer {bearer_token}'
--header "Authorization: Bearer {bearer_token}"
~~~

Replace:
Expand All @@ -117,7 +117,7 @@ To [get details about a private endpoint trusted owner](https://www.cockroachlab
~~~ shell
curl --request GET \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners/{owner_id} \
--header 'Authorization: Bearer {bearer_token}'
--header "Authorization: Bearer {bearer_token}"
~~~

Replace:
Expand All @@ -134,7 +134,7 @@ To [remove a private endpoint trusted owner](https://www.cockroachlabs.com/docs/
~~~ shell
curl --request DELETE \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners/{owner_id} \
--header 'Authorization: {bearer_token}'
--header "Authorization: {bearer_token}"
~~~

Replace:
Expand Down
4 changes: 2 additions & 2 deletions src/current/cockroachcloud/client-certs-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ The [Cluster Admin]({% link cockroachcloud/authorization.md %}#cluster-admin) or
curl --request POST \
--url ${COCKROACH_SERVER}/api/v1/clusters/${CLUSTER_ID}/client-ca-cert \
--header "Authorization: Bearer ${API_KEY}" \
--header 'content-type: application/json' \
--header "content-type: application/json" \
--data "@cockroach_client_ca_cert.json"
~~~

Expand Down Expand Up @@ -263,7 +263,7 @@ The [Cluster Admin]({% link cockroachcloud/authorization.md %}#cluster-admin) or
curl --request PATCH \
--url ${COCKROACH_SERVER}/api/v1/clusters/${CLUSTER_ID}/client-ca-cert \
--header "Authorization: Bearer ${API_KEY}" \
--header 'content-type: application/json' \
--header "content-type: application/json" \
--data "@cockroach_client_ca_cert.json"
~~~

Expand Down
Loading
Loading