From cc1177c4f24bf9da8c3420e64d9e03f1608efebc Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Tue, 11 Feb 2025 13:57:05 +0100 Subject: [PATCH 1/6] pitr limitation added --- .../concepts/backup-to-another-region.md | 10 +- .../btar/enable-backup-to-another-region.md | 152 ++++++++++++------ 2 files changed, 106 insertions(+), 56 deletions(-) diff --git a/docs/platform/concepts/backup-to-another-region.md b/docs/platform/concepts/backup-to-another-region.md index 80a08cfe..f08e777f 100644 --- a/docs/platform/concepts/backup-to-another-region.md +++ b/docs/platform/concepts/backup-to-another-region.md @@ -1,7 +1,7 @@ --- -title: About backup to another region for Aiven services +title: Backup to another region for Aiven services limited: true -sidebar_label: About backup to another region +sidebar_label: Backup to another region --- import RelatedPages from "@site/src/components/non-swizzled/RelatedPages"; @@ -13,8 +13,6 @@ This feature is in [limited availability](/docs/platform/concepts/beta_services) Contact your account team to enable it. ::: -## About BTAR - Backup to another region (BTAR) is a disaster recovery feature that allows backup files to be copied from the service's primary backup region to an additional (secondary) region. BTAR can bolster data resilience and helps improve data protection against @@ -79,10 +77,10 @@ flowchart LR - BTAR is supported for Aiven for MySQL®, Aiven for PostgreSQL®, and Aiven for OpenSearch®. - The cloud provider for your additional backup region must match the cloud provider for your service and the primary backup. - + latest backup. - Secondary backup can only be restored in the region where it was stored. - Secondary backup is generated only after a primary backup is complete, and there might be a data replication lag between the primary region and the secondary region. diff --git a/docs/platform/howto/btar/enable-backup-to-another-region.md b/docs/platform/howto/btar/enable-backup-to-another-region.md index cdc9e752..158c1b7c 100644 --- a/docs/platform/howto/btar/enable-backup-to-another-region.md +++ b/docs/platform/howto/btar/enable-backup-to-another-region.md @@ -4,8 +4,11 @@ sidebar_label: Add cross-region backup limited: true --- -import ConsoleLabel from "@site/src/components/non-swizzled/ConsoleIcons" -import RelatedPages from "@site/src/components/non-swizzled/RelatedPages" +import CreateService from "@site/static/includes/create-service-console.md"; +import ConsoleLabel from "@site/src/components/non-swizzled/ConsoleIcons"; +import RelatedPages from "@site/src/components/non-swizzled/RelatedPages"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; Enable [the backup to another region (BTAR) feature](/docs/platform/concepts/backup-to-another-region) and create an additional cross-region service backup on top of a regular backup stored in the region where your service is hosted. @@ -13,8 +16,8 @@ Enable [the backup to another region (BTAR) feature](/docs/platform/concepts/bac BTAR is supported for Aiven for MySQL®, Aiven for PostgreSQL®, and Aiven for OpenSearch®. ::: -To add an additional service backup for your service, you can use the Aiven -[Console](#enable-btar-console), [CLI](#enable-btar-cli), or [API](#enable-btar-api). +To add an additional service backup for your service, you can use the Aiven Console, CLI, +or API. ## Prerequisites @@ -27,17 +30,20 @@ To add an additional service backup for your service, you can use the Aiven - [Aiven CLI client](/docs/tools/cli) - [cURL](https://curl.se/download.html) CLI tool -## Back up to another region via console {#enable-btar-console} +## Add a cross-region backup to an existing service -1. Log in to the [Aiven Console](https://console.aiven.io/). -1. From the view, select an Aiven service on - which you'd like to enable BTAR. -1. On your service's page, click from the sidebar. + + +1. Log in to the [Aiven Console](https://console.aiven.io/) and go to your project page. +1. From , select an Aiven service on which you'd like to + enable BTAR. +1. On your service's page, click in the sidebar. 1. On the **Backups** page, click > - **Secondary backup location**. -1. In the **Secondary backup location** window, use the **Secondary location** menu to + **Add secondary backup location**. +1. In the **Add secondary backup location** window, toggle the + **Secondary backup location enabled** switch and use the **Backup location** menu to choose a region for your additional backup. -1. Click **Enable** to confirm your selection. +1. Click **Save** to confirm your selection. :::tip For names of the cloud regions supported in Aiven, see column *Cloud* in @@ -46,9 +52,88 @@ To add an additional service backup for your service, you can use the Aiven Your new additional backup is now visible on your service's **Backups** page in the **Secondary backup location** column. + + +Using the [Aiven CLI client](/docs/tools/cli), you can enable BTAR for + +- [New Aiven service](#new-service-cli) or +- [Existing Aiven service](#existing-service-cli) + +:::note[additional_backup_regions] +To enable BTAR on an Aiven service, add the `additional_backup_regions` +parameter to relevant commands. +::: + +Use the [avn service update](/docs/tools/cli/service-cli) command to configure your +service so that it supports BTAR. Include `additional_backup_regions` as a parameter to +the command and set its value to the name of desired cloud region. + +```bash +avn service update name_of_existing_service \ + -c additional_backup_regions=[\"name_of_cloud_region\"] +``` + + +Using [Aiven APIs](/docs/tools/api), you can enable BTAR for: + +- [New Aiven service](#new-service-api) or +- [Existing Aiven service](#existing-service-api) + +:::note[additional_backup_regions] +To enable BTAR on an Aiven service, include the `additional_backup_regions` +parameter in relevant calls. +::: + +Use the [ServiceUpdate](https://api.aiven.io/doc/#tag/Service/operation/ServiceUpdate) API +to configure your existing service so that it supports BTAR. When constructing the API +request, add the `user_config` object to the request body and nest the +`additional_backup_regions` field inside. Set the value of the +`additional_backup_regions` parameter to the name of desired cloud region. + +```bash +curl --request PUT \ + --url https://api.aiven.io/v1/project/YOUR_PROJECT_NAME/service/YOUR_SERVICE_NAME \ + --header 'Authorization: Bearer YOUR_BEARER_TOKEN' \ + --header 'content-type: application/json' \ + --data + '{ + "user_config": { + "additional_backup_regions": ["cloud-region-name"] + } + }' +``` + + + -## Back up to another region with CLI {#enable-btar-cli} +## Add a cross-region backup to a new service + + + +#### 1. Create a service + + + +#### 2. Add a backup for the new service + +1. On your service's page, click in the sidebar. +1. On the **Backups** page, click > + **Add secondary backup location**. +1. In the **Add secondary backup location** window, toggle the + **Secondary backup location enabled** switch and use the **Backup location** menu to + choose a region for your additional backup. +1. Click **Save** to confirm your selection. + + :::tip + For names of the cloud regions supported in Aiven, see column *Cloud* in + [List of available cloud regions](/docs/platform/reference/list_of_clouds). + ::: + +Your new additional backup is now visible on your service's **Backups** page in the +**Secondary backup location** column. + + Using the [Aiven CLI client](/docs/tools/cli), you can enable BTAR for - [New Aiven service](#new-service-cli) or @@ -59,8 +144,6 @@ To enable BTAR on an Aiven service, add the `additional_backup_regions` parameter to relevant commands. ::: -### Create a service with BTAR via CLI {#new-service-cli} - Use the [avn service create](/docs/tools/cli/service-cli) command to create a service. Include `additional_backup_regions` as a parameter to the command and set its value to the name of the desired cloud region. @@ -74,19 +157,8 @@ avn service create \ new_service_name ``` -### Enable BTAR on an existing service via CLI {#existing-service-cli} - -Use the [avn service update](/docs/tools/cli/service-cli) command to configure your -service so that it supports BTAR. Include `additional_backup_regions` as a parameter to -the command and set its value to the name of desired cloud region. - -```bash -avn service update name_of_existing_service \ - -c additional_backup_regions=[\"name_of_cloud_region\"] -``` - -## Back up to another region with API {#enable-btar-api} - + + Using [Aiven APIs](/docs/tools/api), you can enable BTAR for: - [New Aiven service](#new-service-api) or @@ -97,8 +169,6 @@ To enable BTAR on an Aiven service, include the `additional_backup_regions` parameter in relevant calls. ::: -### Create a service with BTAR via API {#new-service-api} - Use the [ServiceCreate](https://api.aiven.io/doc/#tag/Service/operation/ServiceCreate) API to create a service with BTAR enabled. When constructing the API request, add the `user_config` object to the request body and nest the `additional_backup_regions` @@ -121,26 +191,8 @@ curl --request POST \ }' ``` -### Enable BTAR on an existing service via API {#existing-service-api} - -Use the [ServiceUpdate](https://api.aiven.io/doc/#tag/Service/operation/ServiceUpdate) API -to configure your existing service so that it supports BTAR. When constructing the API -request, add the `user_config` object to the request body and nest the -`additional_backup_regions` field inside. Set the value of the -`additional_backup_regions` parameter to the name of desired cloud region. - -```bash -curl --request PUT \ - --url https://api.aiven.io/v1/project/YOUR_PROJECT_NAME/service/YOUR_SERVICE_NAME \ - --header 'Authorization: Bearer YOUR_BEARER_TOKEN' \ - --header 'content-type: application/json' \ - --data - '{ - "user_config": { - "additional_backup_regions": ["cloud-region-name"] - } - }' -``` + + From 7f1588e9fb921797519ee704c0880f79f13b1f9c Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Tue, 11 Feb 2025 14:04:54 +0100 Subject: [PATCH 2/6] pitr option added for btar setup --- .../btar/disable-backup-to-another-region.md | 27 ++-- .../btar/enable-backup-to-another-region.md | 50 +------ .../btar/manage-backup-to-another-region.md | 126 ++++++++++++++---- 3 files changed, 123 insertions(+), 80 deletions(-) diff --git a/docs/platform/howto/btar/disable-backup-to-another-region.md b/docs/platform/howto/btar/disable-backup-to-another-region.md index ca6d1b2f..32a41504 100644 --- a/docs/platform/howto/btar/disable-backup-to-another-region.md +++ b/docs/platform/howto/btar/disable-backup-to-another-region.md @@ -5,15 +5,19 @@ limited: true --- import ConsoleLabel from "@site/src/components/non-swizzled/ConsoleIcons"; -import RelatedPages from "@site/src/components/non-swizzled/RelatedPages" +import RelatedPages from "@site/src/components/non-swizzled/RelatedPages"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; Delete an [additional service backup](/docs/platform/concepts/backup-to-another-region) [created](/docs/platform/howto/btar/enable-backup-to-another-region) in a region different from your primary backup region. -You can delete a cross-region backup using the Aiven [console](#delete-btar-console), -[CLI](#delete-btar-cli), or [API](#delete-btar-api). - -## Delete backup via console {#delete-btar-console} +You can delete a cross-region backup using the [Aiven Console](/docs/tools/aiven-console), +[API](/docs/tools/api), or [CLI](/docs/tools/cli). When you delete +the additional cross-region backup, you still have the default backup located in the +primary (service-hosting) region. + + 1. Log in to the [Aiven Console](https://console.aiven.io/). 1. From the **Services** view, select an Aiven service on which you'd like to disable BTAR. 1. On your service's page, select **Backups** from the sidebar. @@ -22,9 +26,8 @@ You can delete a cross-region backup using the Aiven [console](#delete-btar-cons Your additional service backup is no longer visible on your service's **Backups** page in the **Secondary backup location** column. - -## Delete backup with CLI {#delete-btar-cli} - + + To remove secondary backups for your service, use the [avn service update](/docs/tools/cli/service-cli) command to remove all target regions names from the `additional_backup_regions` array. @@ -34,8 +37,8 @@ avn service update your-sevice-name \ -c additional_backup_regions=\[\] ``` -## Delete backup with API {#delete-btar-api} - + + To remove secondary backups for your service, update the service configuration. Use the [ServiceUpdate](https://api.aiven.io/doc/#tag/Service/operation/ServiceUpdate) endpoint to remove all target regions names from the `additional_backup_regions` array. @@ -53,8 +56,8 @@ curl --request PUT }' ``` -The additional cross-region backup has been deleted. You still have the default backup -located in the primary (service-hosting) region. + + diff --git a/docs/platform/howto/btar/enable-backup-to-another-region.md b/docs/platform/howto/btar/enable-backup-to-another-region.md index 158c1b7c..b8d30a78 100644 --- a/docs/platform/howto/btar/enable-backup-to-another-region.md +++ b/docs/platform/howto/btar/enable-backup-to-another-region.md @@ -17,7 +17,11 @@ BTAR is supported for Aiven for MySQL®, Aiven for PostgreSQL®, and Aiven for O ::: To add an additional service backup for your service, you can use the Aiven Console, CLI, -or API. +or API. You can enable BTAR for + +- [New Aiven service](/docs/platform/howto/btar/enable-backup-to-another-region#add-a-cross-region-backup-to-a-new-service) + or +- [Existing Aiven service](/docs/platform/howto/btar/enable-backup-to-another-region#add-a-cross-region-backup-to-an-existing-service) ## Prerequisites @@ -27,8 +31,8 @@ or API. - Depending on your preferred tool to manage BTAR with, make sure you can access or use: - [Aiven Console](https://console.aiven.io/) - - [Aiven CLI client](/docs/tools/cli) - - [cURL](https://curl.se/download.html) CLI tool + - [Aiven CLI](/docs/tools/cli) + - [Aiven API](/docs/tools/api) ## Add a cross-region backup to an existing service @@ -54,16 +58,6 @@ Your new additional backup is now visible on your service's **Backups** page in **Secondary backup location** column. -Using the [Aiven CLI client](/docs/tools/cli), you can enable BTAR for - -- [New Aiven service](#new-service-cli) or -- [Existing Aiven service](#existing-service-cli) - -:::note[additional_backup_regions] -To enable BTAR on an Aiven service, add the `additional_backup_regions` -parameter to relevant commands. -::: - Use the [avn service update](/docs/tools/cli/service-cli) command to configure your service so that it supports BTAR. Include `additional_backup_regions` as a parameter to the command and set its value to the name of desired cloud region. @@ -74,16 +68,6 @@ avn service update name_of_existing_service \ ``` -Using [Aiven APIs](/docs/tools/api), you can enable BTAR for: - -- [New Aiven service](#new-service-api) or -- [Existing Aiven service](#existing-service-api) - -:::note[additional_backup_regions] -To enable BTAR on an Aiven service, include the `additional_backup_regions` -parameter in relevant calls. -::: - Use the [ServiceUpdate](https://api.aiven.io/doc/#tag/Service/operation/ServiceUpdate) API to configure your existing service so that it supports BTAR. When constructing the API request, add the `user_config` object to the request body and nest the @@ -134,16 +118,6 @@ Your new additional backup is now visible on your service's **Backups** page in **Secondary backup location** column. -Using the [Aiven CLI client](/docs/tools/cli), you can enable BTAR for - -- [New Aiven service](#new-service-cli) or -- [Existing Aiven service](#existing-service-cli) - -:::note[additional_backup_regions] -To enable BTAR on an Aiven service, add the `additional_backup_regions` -parameter to relevant commands. -::: - Use the [avn service create](/docs/tools/cli/service-cli) command to create a service. Include `additional_backup_regions` as a parameter to the command and set its value to the name of the desired cloud region. @@ -159,16 +133,6 @@ avn service create \ -Using [Aiven APIs](/docs/tools/api), you can enable BTAR for: - -- [New Aiven service](#new-service-api) or -- [Existing Aiven service](#existing-service-api) - -:::note[additional_backup_regions] -To enable BTAR on an Aiven service, include the `additional_backup_regions` -parameter in relevant calls. -::: - Use the [ServiceCreate](https://api.aiven.io/doc/#tag/Service/operation/ServiceCreate) API to create a service with BTAR enabled. When constructing the API request, add the `user_config` object to the request body and nest the `additional_backup_regions` diff --git a/docs/platform/howto/btar/manage-backup-to-another-region.md b/docs/platform/howto/btar/manage-backup-to-another-region.md index 94907194..2c20082e 100644 --- a/docs/platform/howto/btar/manage-backup-to-another-region.md +++ b/docs/platform/howto/btar/manage-backup-to-another-region.md @@ -5,22 +5,29 @@ limited: true --- import RelatedPages from "@site/src/components/non-swizzled/RelatedPages"; +import ConsoleLabel from "@site/src/components/non-swizzled/ConsoleIcons"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; For a service that has the [backup to another region (BTAR)](/docs/platform/concepts/backup-to-another-region) feature [enabled](/docs/platform/howto/btar/enable-backup-to-another-region), you can check the service backup status, change the backup region, monitor the replication lag, fork and restore using [the cross-region backup](/docs/platform/concepts/backup-to-another-region), or migrate to another cloud or region. ## Prerequisites -You have at least one -[Aiven service with BTAR enabled](/docs/platform/howto/btar/enable-backup-to-another-region). +- At least one + [Aiven service with BTAR enabled](/docs/platform/howto/btar/enable-backup-to-another-region) +- Access to the [Aiven Console](https://console.aiven.io/) +- [Aiven API](/docs/tools/api) +- - [Aiven CLI](/docs/tools/api) ## Change a backup region -1. Log in to the [Aiven Console](https://console.aiven.io/). -1. From the **Services** view, select an Aiven service on which you'd like to enable BTAR. -1. On your service's page, select **Backups** from the sidebar. -1. On the **Backups** page, select the actions (**...**) menu > **Secondary backup - location**. -1. In the **Edit secondary backup location** window, use the **Secondary location** +1. Log in to the [Aiven Console](https://console.aiven.io/) and go to your project. +1. On the page, select an Aiven service on which you'd + like to enable BTAR. +1. On your service page, click in the sidebar. +1. On the **Backups** page, click > + **Edit secondary backup location**. +1. In the **Edit secondary backup location** window, use the **Backup location** menu to select a region for your additional backup. Confirm your choice by selecting **Save**. @@ -41,13 +48,13 @@ BTAR: - What is the replication lag between data availability in the primary region and the secondary region? -### Check BTAR status in the console +### Check BTAR status To see the availability, the status, and the target region of a secondary (BTAR) backup in the [Aiven Console](https://console.aiven.io/), go to your -**service's page** > **Backups** view > **Secondary backup location** column. +service page > > **Secondary backup location**. -### Determine replication lag with API +### Determine replication lag Determine the target region and the replication lag for a secondary (BTAR) backup of your service, call the @@ -56,8 +63,8 @@ endpoint. Configure the call as follows: -1. Enter YOUR-PROJECT-NAME and YOUR-SERVICE-NAME into the URL. -1. Specify DESIRED-TIME-PERIOD depending on the time period you need the metrics for: +1. Enter `YOUR-PROJECT-NAME` and `YOUR-SERVICE-NAME` into the URL. +1. Specify `DESIRED-TIME-PERIOD` depending on the time period you need the metrics for: select one of the following values for the `period` key: `hour`, `day`, `week`, `month`, or `year`. @@ -73,10 +80,10 @@ As output, you get metrics including replication lags at specific points in time ## Fork and restore a service with BTAR {#fork-and-restore} -You can use the [Aiven Console](https://console.aiven.io/) to recover your service from a -backup in another region. To restore your service using BTAR, -[create a fork](/docs/platform/concepts/service-forking) of the original service in the -region where the secondary backup resides. +You can use the [Aiven Console](/docs/tools/aiven-console), [API](/docs/tools/api), or +[CLI](/docs/tools/cli) to recover your service from a backup in another region. To restore +your service using BTAR, [create a fork](/docs/platform/concepts/service-forking) of the +original service in the region where the secondary backup resides. :::note When you **Fork & restore** from the secondary backup, your new fork service is created in @@ -85,24 +92,93 @@ plan that the primary service uses. Backups of the fork service are located in t where this new service is hosted. ::: + + 1. Open the [Aiven Console](https://console.aiven.io/) and go to your service homepage. -1. Select **Backups** from the sidebar. +1. Click in the sidebar. 1. On the **Backups** page, select **Fork & restore**. -1. In the **New database fork** window, apply the following settings: +1. In the **New database fork** window: - 1. As **Source backup location**, select **Secondary location**. - + For **Point in time**, set up the time to no later than the time of taking the + latest backup. + ::: 1. Specify a name for the new fork service. 1. Select **Create fork**. + + + +Run the [avn service create](/docs/tools/cli/service-cli#avn-cli-service-create) command +with the `--service-to-fork-from` option and the `--recovery-target-time`option. Set +`--recovery-target-time` to a point in time between the oldest replicated base backup and +your current time. + +```bash {6,7} +avn service create FORK_SERVICE_NAME \ + --plan SERVICE_PLAN \ + --project PROJECT_NAME \ + --service-type SERVICE_TYPE \ + --cloud SECONDARY_BACKUP_REGION \ + --recovery-target-time "YYYY-MM-DDTHH:MM:SS+00:00" \ + --service-to-fork-from PRIMARY_SERVICE_NAME +``` + +Replace the following with meaningful data: + +- `FORK_SERVICE_NAME` +- `SERVICE_PLAN` +- `PROJECT_NAME` +- `SERVICE_TYPE` +- `SECONDARY_BACKUP_REGION` +- `PRIMARY_SERVICE_NAME` +- `YYYY-MM-DDTHH:MM:SS+00:00` + + + + +Use the [ServiceCreate](https://api.aiven.io/doc/#tag/Service/operation/ServiceCreate) API +to create a fork service. When constructing the API request, add the `user_config` object +to the request body and nest the `service_to_fork_from` field and the +`recovery_target_time` field inside. Set `recovery_target_time` to a point in time between +the oldest replicated base backup and your current time. + +```bash +curl --request POST \ + --url https://api.aiven.io/v1/project/PROJECT_NAME/service \ + --header 'Authorization: Bearer BEARER_TOKEN' \ + --header 'content-type: application/json' \ + --data + '{ + "cloud": "SECONDARY_BACKUP_REGION", + "plan": "SERVICE_PLAN", + "service_name": "FORK_SERVICE_NAME", + "service_type": "SERVICE_TYPE", + "user_config": { + "service_to_fork_from": "PRIMARY_SERVICE_NAME", + "recovery_target_time": "YYYY-MM-DDTHH:MM:SS+00:00" + } + }' +``` + +Replace the following with meaningful data: + +- `FORK_SERVICE_NAME` +- `SERVICE_PLAN` +- `PROJECT_NAME` +- `SERVICE_TYPE` +- `SECONDARY_BACKUP_REGION` +- `PRIMARY_SERVICE_NAME` +- `YYYY-MM-DDTHH:MM:SS+00:00` + + + + ## Migrate a service with BTAR You can migrate a service with BTAR the same way you From 977e2ebf0798ce6f8a114e1ccd08a6c86be2f35f Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Wed, 12 Feb 2025 11:51:43 +0100 Subject: [PATCH 3/6] ready for review --- .../btar/manage-backup-to-another-region.md | 23 ++++++++++--------- sidebars.ts | 5 +++- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/platform/howto/btar/manage-backup-to-another-region.md b/docs/platform/howto/btar/manage-backup-to-another-region.md index 2c20082e..da251f53 100644 --- a/docs/platform/howto/btar/manage-backup-to-another-region.md +++ b/docs/platform/howto/btar/manage-backup-to-another-region.md @@ -17,7 +17,7 @@ For a service that has the [backup to another region (BTAR)](/docs/platform/conc [Aiven service with BTAR enabled](/docs/platform/howto/btar/enable-backup-to-another-region) - Access to the [Aiven Console](https://console.aiven.io/) - [Aiven API](/docs/tools/api) -- - [Aiven CLI](/docs/tools/api) +- [Aiven CLI](/docs/tools/api) ## Change a backup region @@ -86,7 +86,7 @@ your service using BTAR, [create a fork](/docs/platform/concepts/service-forking original service in the region where the secondary backup resides. :::note -When you **Fork & restore** from the secondary backup, your new fork service is created in +When you **fork & restore** from the secondary backup, your new fork service is created in the cloud and region where the secondary backup is located. The fork service gets the same plan that the primary service uses. Backups of the fork service are located in the region where this new service is hosted. @@ -101,12 +101,12 @@ where this new service is hosted. 1. In the **New database fork** window: 1. Set **Backup location** to either **Primary location** or **Secondary location**. - 1. Set **Backup version** to either **Latest transaction** or **Point in time**. + 1. Set **Backup version** to one of the following: - :::note - For **Point in time**, set up the time to no later than the time of taking the - latest backup. - ::: + - **Latest transaction** + - **Point in time**: Set it up to no earlier than the time of taking the oldest + replicated base backup and no later than the time of taking the latest replicated + base backup. 1. Specify a name for the new fork service. 1. Select **Create fork**. @@ -116,8 +116,8 @@ where this new service is hosted. Run the [avn service create](/docs/tools/cli/service-cli#avn-cli-service-create) command with the `--service-to-fork-from` option and the `--recovery-target-time`option. Set -`--recovery-target-time` to a point in time between the oldest replicated base backup and -your current time. +`--recovery-target-time` to no earlier than the time of taking the oldest replicated base +backup and no later than the time of taking the latest replicated base backup. ```bash {6,7} avn service create FORK_SERVICE_NAME \ @@ -145,8 +145,9 @@ Replace the following with meaningful data: Use the [ServiceCreate](https://api.aiven.io/doc/#tag/Service/operation/ServiceCreate) API to create a fork service. When constructing the API request, add the `user_config` object to the request body and nest the `service_to_fork_from` field and the -`recovery_target_time` field inside. Set `recovery_target_time` to a point in time between -the oldest replicated base backup and your current time. +`recovery_target_time` field inside. Set `recovery_target_time` to no earlier than the +time of taking the oldest replicated base backup and no later than the time of taking the +latest replicated base backup. ```bash curl --request POST \ diff --git a/sidebars.ts b/sidebars.ts index 4e20615f..825ab557 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -205,8 +205,11 @@ const sidebars: SidebarsConfig = { { type: 'category', label: 'Backup to another region', + link: { + type: 'doc', + id: 'platform/concepts/backup-to-another-region', + }, items: [ - 'platform/concepts/backup-to-another-region', 'platform/howto/btar/enable-backup-to-another-region', 'platform/howto/btar/manage-backup-to-another-region', 'platform/howto/btar/disable-backup-to-another-region', From 06177b729e64c255ddefec3228eced26ccf5162f Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Wed, 12 Feb 2025 13:33:29 +0100 Subject: [PATCH 4/6] feedback --- .../howto/btar/manage-backup-to-another-region.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/platform/howto/btar/manage-backup-to-another-region.md b/docs/platform/howto/btar/manage-backup-to-another-region.md index da251f53..9a55bf88 100644 --- a/docs/platform/howto/btar/manage-backup-to-another-region.md +++ b/docs/platform/howto/btar/manage-backup-to-another-region.md @@ -105,8 +105,7 @@ where this new service is hosted. - **Latest transaction** - **Point in time**: Set it up to no earlier than the time of taking the oldest - replicated base backup and no later than the time of taking the latest replicated - base backup. + replicated base backup. 1. Specify a name for the new fork service. 1. Select **Create fork**. @@ -117,7 +116,7 @@ where this new service is hosted. Run the [avn service create](/docs/tools/cli/service-cli#avn-cli-service-create) command with the `--service-to-fork-from` option and the `--recovery-target-time`option. Set `--recovery-target-time` to no earlier than the time of taking the oldest replicated base -backup and no later than the time of taking the latest replicated base backup. +backup. ```bash {6,7} avn service create FORK_SERVICE_NAME \ @@ -146,8 +145,7 @@ Use the [ServiceCreate](https://api.aiven.io/doc/#tag/Service/operation/ServiceC to create a fork service. When constructing the API request, add the `user_config` object to the request body and nest the `service_to_fork_from` field and the `recovery_target_time` field inside. Set `recovery_target_time` to no earlier than the -time of taking the oldest replicated base backup and no later than the time of taking the -latest replicated base backup. +time of taking the oldest replicated base backup. ```bash curl --request POST \ From ae061bfdd3dd3afd411ac723708be19bb5c79d75 Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Wed, 12 Feb 2025 14:51:53 +0100 Subject: [PATCH 5/6] feedback --- docs/platform/concepts/backup-to-another-region.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platform/concepts/backup-to-another-region.md b/docs/platform/concepts/backup-to-another-region.md index f08e777f..4adb9722 100644 --- a/docs/platform/concepts/backup-to-another-region.md +++ b/docs/platform/concepts/backup-to-another-region.md @@ -79,8 +79,8 @@ flowchart LR your service and the primary backup. - To [restore your service from an additional backup](/docs/platform/howto/btar/manage-backup-to-another-region) - using point-in-time recovery (PITR), set up the time to no later than the time of the - latest backup. + using point-in-time recovery (PITR), set up the time to no earlier than the time of + taking the oldest replicated base backup. - Secondary backup can only be restored in the region where it was stored. - Secondary backup is generated only after a primary backup is complete, and there might be a data replication lag between the primary region and the secondary region. From d81e48776285c4554684deb307363133e8e55c9c Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Wed, 12 Feb 2025 15:31:05 +0100 Subject: [PATCH 6/6] AF's feedback --- docs/platform/howto/btar/enable-backup-to-another-region.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platform/howto/btar/enable-backup-to-another-region.md b/docs/platform/howto/btar/enable-backup-to-another-region.md index b8d30a78..223e6701 100644 --- a/docs/platform/howto/btar/enable-backup-to-another-region.md +++ b/docs/platform/howto/btar/enable-backup-to-another-region.md @@ -95,11 +95,11 @@ curl --request PUT -#### 1. Create a service +#### Step 1: Create a service -#### 2. Add a backup for the new service +#### Step 2: Add a backup for the new service 1. On your service's page, click in the sidebar. 1. On the **Backups** page, click >