Skip to content

Commit 5ffd835

Browse files
authored
Merge branch 'main' into add-databrain-integration-documentation
2 parents 4f679a2 + c282f0b commit 5ffd835

File tree

89 files changed

+2355
-611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2355
-611
lines changed

.github/workflows/badges-notify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Make script executable
1919
run: chmod +x scripts/badger.sh

.github/workflows/build-search.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- name: Checkout Repository
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424

2525
- name: Set up Node.js
26-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@v6
2727
with:
2828
node-version: '20'
2929

.github/workflows/check-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
check_type: [spellcheck, kbcheck, md-lint, glossary-check]
2020
steps:
2121
# Add setup steps per check here
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323
- name: Install Aspell
2424
if: matrix.check_type == 'spellcheck'
2525
run: sudo apt-get update && sudo apt-get install -y aspell aspell-en
@@ -31,7 +31,7 @@ jobs:
3131
uv python install 3.12 --verbose
3232
- name: Setup md-lint environment
3333
if: matrix.check_type == 'md-lint'
34-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@v6
3535
with:
3636
node-version: 20
3737
- name: Install markdownlint-cli2

.github/workflows/pull-request.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout repository
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v5
2525

2626
- name: Set up Node.js
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v6
2828
with:
2929
node-version: '20' # Adjust Node.js version as needed
3030
cache: 'yarn' # Cache yarn dependencies

.github/workflows/trademark-cla-approval.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
171171
- name: Check out repository
172172
if: success() && steps.process-comment.outputs.pr_number != ''
173-
uses: actions/checkout@v4
173+
uses: actions/checkout@v5
174174
with:
175175
fetch-depth: 0
176176
# For forked PRs, we need to fetch from the fork and checkout the SHA

.github/workflows/trademark-cla-notice.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
private-key: "${{ secrets.WORKFLOW_AUTH_PUBLIC_PRIVATE_KEY }}"
2626

2727
- name: Check out code
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
3131
# Use the GitHub App token if available, otherwise fallback to GITHUB_TOKEN

.github/workflows/vale-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
timeout-minutes: 10
2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v5
2424
with:
2525
fetch-depth: 0
2626
path: .

docs/best-practices/_snippets/_avoid_mutations.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ When a mutation is issued, ClickHouse schedules the creation of new **mutated pa
66

77
For large datasets, this can produce a substantial spike in disk I/O and degrade overall cluster performance. Unlike merges, mutations can't be rolled back once submitted and will continue to execute even after server restarts unless explicitly cancelled—see [`KILL MUTATION`](/sql-reference/statements/kill#kill-mutation).
88

9+
:::tip Monitoring the number of active or queued mutations in ClickHouse
10+
For how to monitor the number of active or queued mutations refer to the following [knowledge base article](/knowledgebase/view_number_of_active_mutations).
11+
:::
12+
913
Mutations are **totally ordered**: they apply to data inserted before the mutation was issued, while newer data remains unaffected. They do not block inserts but can still overlap with other ongoing queries. A SELECT running during a mutation may read a mix of mutated and unmutated parts, which can lead to inconsistent views of the data during execution. ClickHouse executes mutations in parallel per part, which can further intensify memory and CPU usage, especially when complex subqueries (like x IN (SELECT ...)) are involved.
1014

1115
As a rule, **avoid frequent or large-scale mutations**, especially on high-volume tables. Instead, use alternative table engines such as [ReplacingMergeTree](/guides/replacing-merge-tree) or [CollapsingMergeTree](/engines/table-engines/mergetree-family/collapsingmergetree), which are designed to handle data corrections more efficiently at query time or during merges. If mutations are absolutely necessary, monitor them carefully using the system.mutations table and use `KILL MUTATION` if a process is stuck or misbehaving. Misusing mutations can lead to degraded performance, excessive storage churn, and potential service instability—so apply them with caution and sparingly.

docs/cloud/features/08_backups.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
sidebar_label: 'Backups'
3+
slug: /cloud/features/backups
4+
title: 'Backups'
5+
keywords: ['backups', 'cloud backups', 'restore']
6+
description: 'Provides an overview of backup features in ClickHouse Cloud'
7+
doc_type: 'reference'
8+
---
9+
10+
import Image from '@theme/IdealImage';
11+
import ScalePlanFeatureBadge from '@theme/badges/ScalePlanFeatureBadge';
12+
import EnterprisePlanFeatureBadge from '@theme/badges/EnterprisePlanFeatureBadge'
13+
import backup_chain from '@site/static/images/cloud/manage/backup-chain.png';
14+
15+
Database backups provide a safety net by ensuring that if data is lost for any unforeseen reason, the service can be restored to a previous state from the last successful backup.
16+
This minimizes downtime and prevents business critical data from being permanently lost.
17+
18+
## Backups {#backups}
19+
20+
### How backups work in ClickHouse Cloud {#how-backups-work-in-clickhouse-cloud}
21+
22+
ClickHouse Cloud backups are a combination of "full" and "incremental" backups that constitute a backup chain. The chain starts with a full backup, and incremental backups are then taken over the next several scheduled time periods to create a sequence of backups. Once a backup chain reaches a certain length, a new chain is started. This entire chain of backups can then be utilized to restore data to a new service if needed. Once all backups included in a specific chain are past the retention time frame set for the service (more on retention below), the chain is discarded.
23+
24+
In the screenshot below, the solid line squares show full backups and the dotted line squares show incremental backups. The solid line rectangle around the squares denotes the retention period and the backups that are visible to the end user, which can be used for a backup restore. In the scenario below, backups are being taken every 24 hours and are retained for 2 days.
25+
26+
On Day 1, a full backup is taken to start the backup chain. On Day 2, an incremental backup is taken, and we now have a full and incremental backup available to restore from. By Day 7, we have one full backup and six incremental backups in the chain, with the most recent two incremental backups visible to the user. On Day 8, we take a new full backup, and on Day 9, once we have two backups in the new chain, the previous chain is discarded.
27+
28+
<Image img={backup_chain} size="lg" alt="Backup chain example in ClickHouse Cloud" />
29+
30+
### Default backup policy {#default-backup-policy}
31+
32+
In the Basic, Scale, and Enterprise tiers, backups are metered and billed separately from storage.
33+
All services will default to one daily backup with the ability to configure more, starting with the Scale tier, via the Settings tab of the Cloud console.
34+
Each backup will be retained for at least 24 hours.
35+
36+
See ["Review and restore backups"](/cloud/manage/backups/overview) for further details.
37+
38+
## Configurable backups {#configurable-backups}
39+
40+
<ScalePlanFeatureBadge feature="Configurable Backups" linking_verb_are="True"/>
41+
42+
ClickHouse Cloud allows you to configure the schedule for your backups for **Scale** and **Enterprise** tier services. Backups can be configured along the following dimensions based on your business needs.
43+
44+
- **Retention**: The duration of days, for which each backup will be retained. Retention can be specified as low as 1 day, and as high as 30 days with several values to pick in between.
45+
- **Frequency**: The frequency allows you to specify the time duration between subsequent backups. For instance, a frequency of "every 12 hours" means that backups will be spaced 12 hours apart. Frequency can range from "every 6 hours" to "every 48 hours" in the following hourly increments: `6`, `8`, `12`, `16`, `20`, `24`, `36`, `48`.
46+
- **Start Time**: The start time for when you want to schedule backups each day. Specifying a start time implies that the backup "Frequency" will default to once every 24 hours. Clickhouse Cloud will start the backup within an hour of the specified start time.
47+
48+
:::note
49+
The custom schedule will override the default backup policy in ClickHouse Cloud for your given service.
50+
51+
In some rare scenarios, the backup scheduler will not respect the **Start Time** specified for backups. Specifically, this happens if there was a successful backup triggered < 24 hours from the time of the currently scheduled backup. This could happen due to a retry mechanism we have in place for backups. In such instances, the scheduler will skip over the backup for the current day, and will retry the backup the next day at the scheduled time.
52+
:::
53+
54+
See ["Configure backup schedules"](/cloud/manage/backups/configurable-backups) for steps to configure your backups.
55+
56+
## Bring Your Own Bucket (BYOB) Backups {#byob}
57+
58+
<EnterprisePlanFeatureBadge/>
59+
60+
ClickHouse Cloud allows exporting backups to your own cloud service provider (CSP) account storage (AWS S3, Google Cloud Storage, or Azure Blob Storage).
61+
If you configure backups to your own bucket, ClickHouse Cloud will still take daily backups to its own bucket.
62+
This is to ensure that we have at least one copy of the data to restore from in case the backups in your bucket get corrupted.
63+
For details of how ClickHouse Cloud backups work, see the [backups](/cloud/manage/backups/overview) docs.
64+
65+
In this guide, we walk through how you can export backups to your AWS, GCP, Azure object storage, as well as how to restore these backups in your account to a new ClickHouse Cloud service.
66+
We also share backup / restore commands that allow you to export backups to your bucket and restore them.
67+
68+
:::note Cross-region backups
69+
Users should be aware that any usage where backups are being exported to a
70+
different region in the same cloud provider will incur [data transfer](/cloud/manage/network-data-transfer)
71+
charges.
72+
73+
Currently, we do not support cross-cloud backups, nor backup / restore for services utilizing [Transparent Data Encryption (TDE)](/cloud/security/cmek#transparent-data-encryption-tde) or for regulated services.
74+
:::
75+
76+
See ["Export backups to your own Cloud account"](/cloud/manage/backups/export-backups-to-own-cloud-account) for examples of how to take full and incremental backups to AWS, GCP, Azure object storage as well as how to restore from the backups.
77+
78+
### Backup options {#backup-options}
79+
80+
To export backups to your own cloud account, you have two options:
81+
82+
<VerticalStepper headerLevel="h5">
83+
84+
##### Via Cloud Console UI {#via-ui}
85+
86+
External backups can be [configured in the UI](/cloud/manage/backups/backup-restore-via-ui).
87+
By default, backups will then be taken daily (as specified in the [default backup policy](/cloud/features/backups#default-backup-policy)).
88+
However, we also support [configurable](/cloud/manage/backups/configurable-backups) backups to your own cloud account, which allows for setting a custom schedule.
89+
It is important to note that all backups to your bucket are full backups with no relationship to other previous or future backups.
90+
91+
##### Using SQL commands {#using-commands}
92+
93+
You can use [SQL commands](/cloud/manage/backups/backup-restore-via-commands) to export backups to your bucket.
94+
95+
</VerticalStepper>
96+
97+
:::warning
98+
ClickHouse Cloud will not manage the lifecycle of backups in customer buckets.
99+
Customers are responsible for ensuring that backups in their bucket are managed appropriately for adhering to compliance standards as well as managing cost.
100+
If the backups are corrupted, they will not be able to be restored.
101+
:::

docs/cloud/features/08_backups/backups-to-own-cloud/_category_.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)