Skip to content
Draft
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
120 changes: 96 additions & 24 deletions docs/platform/concepts/backup-to-another-region.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ sidebar_label: Backup to another region
---

import RelatedPages from "@site/src/components/RelatedPages";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

In addition to the primary service backup, you can have a secondary backup in an alternative location.

Expand All @@ -19,27 +21,64 @@ region. BTAR can bolster data resilience and helps improve data protection again
disasters in the primary backup region. When the primary region is down, BTAR allows
forking the service from an additional copy of the backup residing in a secondary region.

BTAR is supported for the following services:
## Limitations

- The cloud provider for your additional backup region must match the cloud provider for
your service and the primary backup.
- Secondary backup can only be restored in the region where it was stored.

### Supported services

BTAR is only supported for the following service types:

- Aiven for PostgreSQL®
- Aiven for MySQL®
- Aiven for OpenSearch®

### Service-specific limitations

<Tabs groupId="group1">
<TabItem value="sql-relational" label="PostgreSQL & MySQL" default>

- 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 earlier than the time of
taking the oldest replicated base backup.
- 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.

</TabItem>
<TabItem value="non-sql-search-analytics" label="OpenSearch">

- The synchronization of snapshots between the regions works only for base snapshots created
after the BTAR activation.
- Point-in-time recovery (PITR) is not supported for
[restoring your service from an additional backup](/docs/platform/howto/btar/manage-backup-to-another-region).
- Although a base snapshot in the primary region and its corresponding BTAR snapshot in
the secondary region are generated at the same time, there might be some negligible data
discrepancies between them.

</TabItem>
</Tabs>

## How BTAR works

When you enable the backup to another region (BTAR) feature, an additional service backup
is created in the cloud region of your choice that is alternative to the primary backup
When you enable the backup to another region (BTAR) feature, additional service backups
are created in the cloud region of your choice that is alternative to the primary backup
location.

Restoring from a secondary backup, for example in case of an outage of the primary region,
can be done by creating a fork of the service in the region where the secondary backup is
located.

<Tabs groupId="group1">
<TabItem value="sql-relational" label="PostgreSQL & MySQL" default>

Secondary backups are generated from primary backups, not from the service itself. For
this reason, your secondary backup becomes available only after the primary backup is
taken. There might be a data replication lag between the primary region and the secondary
region.

Restoring from a secondary backup, for example in case of an outage of the primary region,
can be done by creating a fork of the service in the region where the secondary backup is
located.

```mermaid
flowchart LR
subgraph Primary_region
Expand All @@ -50,7 +89,6 @@ flowchart LR
direction LR
PB1
PB2
PB3
PBn
end
end
Expand All @@ -62,28 +100,62 @@ flowchart LR
direction LR
SB1
SB2
SB3
SBn
end
end
Service_X -- Default \n backups --> Primary_backups
Primary_backups -- Cross-region backups \n if BTAR enabled --> Secondary_backups
Secondary_backups -- Secondary backups \n to restore service X --> Forked_service_X
Service_X -- Forking service X \n if primary region down --> Forked_service_X
Service_X -- Base backups<br/>by default --> Primary_backups
Primary_backups -- Cross-region backups<br/>if BTAR enabled --> Secondary_backups
Secondary_backups -- Secondary backups<br/>to restore service X --> Forked_service_X
Service_X -- Forking service X<br/>if primary region down --> Forked_service_X
```

## Limitations
</TabItem>
<TabItem value="non-sql-search-analytics" label="OpenSearch">

- 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.
- 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 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.
An additional snapshot repository is created in the secondary region. In this repository,
BTAR snapshots are generated directly from the service. They are created and managed in
synchronization with
[base snapshots](/docs/products/opensearch/howto/manage-snapshots)
in the primary region using the
[native OpenSearch API](https://docs.opensearch.org/latest/api-reference/snapshots/index/).
For example, when a
[base snapshot is created](/docs/products/opensearch/howto/manage-snapshots#create-a-snapshot)
in the primary region, its BTAR counterpart is created simultaneously with an identical
name in the secondary region.

```mermaid
flowchart LR
subgraph Primary_region
direction LR
subgraph Primary_backups
direction TB
PB1
PB2
PBn
end
subgraph Service_X
end
end
subgraph Secondary_region
direction LR
subgraph Forked_service_X
end
subgraph Secondary_backups
direction TB
SB1
SB2
SBn
end
end
Service_X -- Base backups<br/>by default --> Primary_backups
Service_X -- Cross-region backups<br/>if BTAR enabled --> Secondary_backups
Secondary_backups -- Secondary backups<br/>to restore service X --> Forked_service_X
Service_X -- Forking service X<br/>if primary region down --> Forked_service_X

```

</TabItem>
</Tabs>

<RelatedPages/>

Expand Down