You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
11
-
--environment-override value, --env value override any environment variable via CLI parameter
12
-
--all, -a Print table even when match with skip_tables pattern
13
-
--table value, --tables value, -t value List tables only match with table name patterns, separated by comma, allow ? and * as wildcard
14
-
--remote-backup value List tables from a remote backup, including per-table size and parts count
15
-
--local-backup value List tables from a local backup (read from disk, no live ClickHouse query), including per-table size and parts count
16
-
--format value, -f value Output format (text|json|yaml|csv|tsv)
10
+
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
11
+
--environment-override value, --env value override any environment variable via CLI parameter
12
+
--all, -a Print table even when match with skip_tables pattern
13
+
--table value, --tables value, -t value List tables only match with table name patterns, separated by comma, allow ? and * as wildcard
14
+
--remote-backup value List tables from a remote backup, including per-table size and parts count
15
+
--local-backup value List tables from a local backup (read from disk, no live ClickHouse query), including per-table size and parts count
16
+
--format value, -f value Output format (text|json|yaml|csv|tsv)
17
+
--parts system.parts, --list-parts system.parts Also list every physical part for each table (name, partition_id, size)
18
+
Against the live server, reads name/partition_id/bytes_on_disk from system.parts
19
+
Against --local-backup/--remote-backup, reads part names from backup metadata (partition_id derived from the name, no size available)
20
+
--partitions system.parts, --list-partitions system.parts Also list the distinct partitions for each table (partition_id, partition, parts count, size), aggregated from parts
21
+
Against the live server, reads partition_id/partition/parts/size from system.parts
22
+
Against --local-backup/--remote-backup, derives partition_id and parts count from part names (no partition value or per-partition size available)
17
23
18
24
```
19
25
### CLI command - create
@@ -208,6 +214,7 @@ Look at the system.parts partition and partition_id fields for details https://c
208
214
--restore-schema-as-attach Use DETACH/ATTACH instead of DROP/CREATE for schema restoration
209
215
--replicated-copy-to-detached Copy data to detached folder for Replicated*MergeTree tables but skip ATTACH PART step
210
216
--skip-empty-tables Skip restoring tables that have no data (empty tables with only schema)
217
+
--rebind-replica-path-if-exists Override clickhouse.rebind_replica_path_if_exists, rebind a restored ReplicatedMergeTree to default_replica_path when the original ZK path still has leftover state but our replica entry is absent
211
218
212
219
```
213
220
### CLI command - restore_remote
@@ -246,6 +253,7 @@ Look at the system.parts partition and partition_id fields for details https://c
246
253
--restore-schema-as-attach Use DETACH/ATTACH instead of DROP/CREATE for schema restoration
247
254
--hardlink-exists-files Create hardlinks for existing files instead of downloading
248
255
--skip-empty-tables Skip restoring tables that have no data (empty tables with only schema)
256
+
--rebind-replica-path-if-exists Override clickhouse.rebind_replica_path_if_exists, rebind a restored ReplicatedMergeTree to default_replica_path when the original ZK path still has leftover state but our replica entry is absent
Copy file name to clipboardExpand all lines: ReadMe.md
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -486,6 +486,8 @@ Print list of tables: `curl -s localhost:7171/backup/tables | jq .`, exclude pat
486
486
- Optional query argument `table` works the same as the `--table=pattern` CLI argument.
487
487
- Optional query argument `remote_backup` (or `remote-backup`) works the same as the `--remote-backup=name` CLI argument. The response then includes per-table `size`, `total_bytes`, `parts`, and `disks` (JSON array of disk names) fields read from the remote backup metadata.
488
488
- Optional query argument `local_backup` (or `local-backup`) works the same as the `--local-backup=name` CLI argument: it lists tables from a local backup directly from disk (no live ClickHouse query required), with `size`, `total_bytes`, `parts`, and `disks` (JSON array) fields.
489
+
- Optional boolean query argument `list_parts` (alias `parts`) works the same as the `--list-parts`/`--parts` CLI argument: it attaches a `parts_list` array per table (`name`, `partition_id`, and against the live server also `total_bytes`/`size`). Works standalone against the live server or together with `remote_backup`/`local_backup`; against a remote/local backup, `partition_id` is derived from the `_`-delimited prefix of each part's name (no size available there).
490
+
- Optional boolean query argument `partitions` (alias `list_partitions`) works the same as the `--partitions`/`--list-partitions` CLI argument: it attaches a `partitions` array per table (`partition_id`, and against the live server also `partition`/`parts`/`total_bytes`/`size`), aggregated from parts. Independent of `list_parts`; against a remote/local backup, `partition_id` is derived the same way as `list_parts` (no partition value or size available there).
489
491
490
492
### GET /backup/tables/all
491
493
@@ -494,6 +496,7 @@ Print list of tables: `curl -s localhost:7171/backup/tables/all | jq .`, ignore
494
496
- Optional query argument `table` works the same as the `--table=pattern` CLI argument.
495
497
- Optional query argument `remote_backup` (or `remote-backup`) works the same as the `--remote-backup=name` CLI argument; response shape matches `GET /backup/tables` with the remote-backup parameter.
496
498
- Optional query argument `local_backup` (or `local-backup`) works the same as the `--local-backup=name` CLI argument; response shape matches `GET /backup/tables` with the local-backup parameter.
499
+
- Optional boolean query arguments `list_parts`/`parts` and `partitions`/`list_partitions` work the same as on `GET /backup/tables`.
497
500
498
501
### POST /backup/create
499
502
@@ -732,16 +735,22 @@ NAME:
732
735
clickhouse-backup tables - List of tables, exclude skip_tables
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
739
-
--environment-override value, --env value override any environment variable via CLI parameter
740
-
--all, -a Print table even when match with skip_tables pattern
741
-
--table value, --tables value, -t value List tables only match with table name patterns, separated by comma, allow ? and * as wildcard
742
-
--remote-backup value List tables from a remote backup, including per-table size and parts count
743
-
--local-backup value List tables from a local backup (read from disk, no live ClickHouse query), including per-table size and parts count
744
-
--format value, -f value Output format (text|json|yaml|csv|tsv)
741
+
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
742
+
--environment-override value, --env value override any environment variable via CLI parameter
743
+
--all, -a Print table even when match with skip_tables pattern
744
+
--table value, --tables value, -t value List tables only match with table name patterns, separated by comma, allow ? and * as wildcard
745
+
--remote-backup value List tables from a remote backup, including per-table size and parts count
746
+
--local-backup value List tables from a local backup (read from disk, no live ClickHouse query), including per-table size and parts count
747
+
--format value, -f value Output format (text|json|yaml|csv|tsv)
748
+
--parts system.parts, --list-parts system.parts Also list every physical part for each table (name, partition_id, size)
749
+
Against the live server, reads name/partition_id/bytes_on_disk from system.parts
750
+
Against --local-backup/--remote-backup, reads part names from backup metadata (partition_id derived from the name, no size available)
751
+
--partitions system.parts, --list-partitions system.parts Also list the distinct partitions for each table (partition_id, partition, parts count, size), aggregated from parts
752
+
Against the live server, reads partition_id/partition/parts/size from system.parts
753
+
Against --local-backup/--remote-backup, derives partition_id and parts count from part names (no partition value or per-partition size available)
0 commit comments