Skip to content

Commit

Permalink
add(clickhouse): restore from a backup (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojcik-dorota authored Oct 28, 2024
1 parent 39a463e commit 3d7df41
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
20 changes: 12 additions & 8 deletions docs/products/clickhouse/concepts/disaster-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Also see [cross-availability-zone data distribution](/docs/platform/concepts/ava

## Backup and restore

### Backups
### Service backup

Backups of Aiven for ClickHouse services happen automatically on a daily
basis.
Expand All @@ -42,6 +42,9 @@ They cover the following:
- Table content (`part files`)
- Dictionaries

You can
[restore your service from a selected backup](/docs/products/clickhouse/howto/restore-backup).

:::note[Part files]
With the ClickHouse's ReplicatedMergeTree table engine, each INSERT
query results in creating a new file, so-called part, written only once
Expand All @@ -52,16 +55,17 @@ only changed parts are backed up and files already available in the
object storage are left out from the backup.
:::

### Recovery

The restoration of a backup of an Aiven for ClickHouse service is
performed on a running ClickHouse server and proceeds as a regular
power-on of the service. The restoration happens only for powering up a
service after powering it down or forking a service.

For more information on backups in Aiven, see
[Backups at Aiven](/docs/platform/concepts/service_backups).

### Service recovery

Regardless of whether your Aiven for ClickHouse service is powered on or powered off, you
can create its copy and
[restore the data from a selected service backup](/docs/products/clickhouse/howto/restore-backup).
For this purpose, you create a fork from the original service. This spins up a new service
that hosts the data recovered from the selected backup.

## Sharding

Essentially, sharding is a technique of splitting database rows across
Expand Down
24 changes: 24 additions & 0 deletions docs/products/clickhouse/howto/restore-backup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Fork and restore from Aiven for ClickHouse® backups
sidebar_label: Fork & restore from backups
---

import ConsoleLabel from "@site/src/components/ConsoleIcons";

Choose a service [backup](/docs/products/clickhouse/concepts/disaster-recovery#service-backup) to fork from and restore your Aiven for ClickHouse® service.

1. Log in to the [Aiven Console](https://console.aiven.io) and go to your Aiven for
ClickHouse service.
1. Click <ConsoleLabel name="backups"/> in the sidebar.
1. Click **Fork & restore**.
1. In the **New database fork** window, select the following:

- Backup to fork from
- Service name and a project
- Cloud provider and region
- Service plan and additional storage

1. Click **Create fork**.

Once the new fork service is running, you can set up your application's connection settings
to point to this new fork service.
1 change: 1 addition & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,7 @@ const sidebars: SidebarsConfig = {
label: 'Manage service',
items: [
'products/clickhouse/howto/secure-service',
'products/clickhouse/howto/restore-backup',
'products/clickhouse/howto/manage-users-roles',
'products/clickhouse/howto/manage-databases-tables',
'products/clickhouse/howto/query-databases',
Expand Down

0 comments on commit 3d7df41

Please sign in to comment.