Skip to content

Commit

Permalink
sync Manual.md, ReadMe.md and main.go after #779
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Nov 10, 2023
1 parent 8806a7b commit c2920de
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 134 deletions.
66 changes: 37 additions & 29 deletions Manual.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### CLI command - tables
```
NAME:
clickhouse-backup tables - List of tables, exclude skip_tables
clickhouse-backup-race tables - List of tables, exclude skip_tables
USAGE:
clickhouse-backup tables [-t, --tables=<db>.<table>]] [--all]
Expand All @@ -15,7 +15,7 @@ OPTIONS:
### CLI command - create
```
NAME:
clickhouse-backup create - Create new backup
clickhouse-backup-race create - Create new backup
USAGE:
clickhouse-backup create [-t, --tables=<db>.<table>] [--partitions=<partition_names>] [-s, --schema] [--rbac] [--configs] [--skip-check-parts-columns] <backup_name>
Expand All @@ -30,18 +30,20 @@ OPTIONS:
If PARTITION BY clause returns numeric not hashed values for partition_id field in system.parts table, then use --partitions=partition_id1,partition_id2 format
If PARTITION BY clause returns hashed string values, then use --partitions=('non_numeric_field_value_for_part1'),('non_numeric_field_value_for_part2') format
If PARTITION BY clause returns tuple with multiple fields, then use --partitions=(numeric_value1,'string_value1','date_or_datetime_value'),(...) format
Values depend on field types in your table, use single quotes for String and Date/DateTime related types
Values depends on field types in your table, use single quotes for String and Date/DateTime related types
Look at the system.parts partition and partition_id fields for details https://clickhouse.com/docs/en/operations/system-tables/parts/
--schema, -s Backup schemas only
--schema, -s Backup schemas only, will skip data
--rbac, --backup-rbac, --do-backup-rbac Backup RBAC related objects
--configs, --backup-configs, --do-backup-configs Backup 'clickhouse-server' configuration files
--rbac-only Backup RBAC related objects only, will skip backup data, will backup schema only if --schema added
--configs-only Backup 'clickhouse-server' configuration files only, will skip backup data, will backup schema only if --schema added
--skip-check-parts-columns Skip check system.parts_columns to disallow backup inconsistent column types for data parts
```
### CLI command - create_remote
```
NAME:
clickhouse-backup create_remote - Create and upload new backup
clickhouse-backup-race create_remote - Create and upload new backup
USAGE:
clickhouse-backup create_remote [-t, --tables=<db>.<table>] [--partitions=<partition_names>] [--diff-from=<local_backup_name>] [--diff-from-remote=<local_backup_name>] [--schema] [--rbac] [--configs] [--resumable] [--skip-check-parts-columns] <backup_name>
Expand All @@ -56,21 +58,23 @@ OPTIONS:
If PARTITION BY clause returns numeric not hashed values for partition_id field in system.parts table, then use --partitions=partition_id1,partition_id2 format
If PARTITION BY clause returns hashed string values, then use --partitions=('non_numeric_field_value_for_part1'),('non_numeric_field_value_for_part2') format
If PARTITION BY clause returns tuple with multiple fields, then use --partitions=(numeric_value1,'string_value1','date_or_datetime_value'),(...) format
Values depend on field types in your table, use single quotes for String and Date/DateTime related types
Values depends on field types in your table, use single quotes for String and Date/DateTime related types
Look at the system.parts partition and partition_id fields for details https://clickhouse.com/docs/en/operations/system-tables/parts/
--diff-from value Local backup name which used to upload current backup as incremental
--diff-from-remote value Remote backup name which used to upload current backup as incremental
--schema, -s Backup and upload metadata schema only
--schema, -s Backup and upload metadata schema only, will skip data backup
--rbac, --backup-rbac, --do-backup-rbac Backup and upload RBAC related objects
--configs, --backup-configs, --do-backup-configs Backup and upload 'clickhouse-server' configuration files
--rbac-only Backup RBAC related objects only, will skip backup data, will backup schema only if --schema added
--configs-only Backup 'clickhouse-server' configuration files only, will skip backup data, will backup schema only if --schema added
--resume, --resumable Save intermediate upload state and resume upload if backup exists on remote storage, ignore when 'remote_storage: custom' or 'use_embedded_backup_restore: true'
--skip-check-parts-columns Skip check system.parts_columns to disallow backup inconsistent column types for data parts
```
### CLI command - upload
```
NAME:
clickhouse-backup upload - Upload backup to remote storage
clickhouse-backup-race upload - Upload backup to remote storage
USAGE:
clickhouse-backup upload [-t, --tables=<db>.<table>] [--partitions=<partition_names>] [-s, --schema] [--diff-from=<local_backup_name>] [--diff-from-remote=<remote_backup_name>] [--resumable] <backup_name>
Expand All @@ -84,7 +88,7 @@ OPTIONS:
If PARTITION BY clause returns numeric not hashed values for partition_id field in system.parts table, then use --partitions=partition_id1,partition_id2 format
If PARTITION BY clause returns hashed string values, then use --partitions=('non_numeric_field_value_for_part1'),('non_numeric_field_value_for_part2') format
If PARTITION BY clause returns tuple with multiple fields, then use --partitions=(numeric_value1,'string_value1','date_or_datetime_value'),(...) format
Values depend on field types in your table, use single quotes for String and Date/DateTime related types
Values depends on field types in your table, use single quotes for String and Date/DateTime related types
Look at the system.parts partition and partition_id fields for details https://clickhouse.com/docs/en/operations/system-tables/parts/
--schema, -s Upload schemas only
--resume, --resumable Save intermediate upload state and resume upload if backup exists on remote storage, ignored with 'remote_storage: custom' or 'use_embedded_backup_restore: true'
Expand All @@ -93,7 +97,7 @@ Look at the system.parts partition and partition_id fields for details https://c
### CLI command - list
```
NAME:
clickhouse-backup list - List of backups
clickhouse-backup-race list - List of backups
USAGE:
clickhouse-backup list [all|local|remote] [latest|previous]
Expand All @@ -105,7 +109,7 @@ OPTIONS:
### CLI command - download
```
NAME:
clickhouse-backup download - Download backup from remote storage
clickhouse-backup-race download - Download backup from remote storage
USAGE:
clickhouse-backup download [-t, --tables=<db>.<table>] [--partitions=<partition_names>] [-s, --schema] [--resumable] <backup_name>
Expand All @@ -126,7 +130,7 @@ Look at the system.parts partition and partition_id fields for details https://c
### CLI command - restore
```
NAME:
clickhouse-backup restore - Create schema and restore data from backup
clickhouse-backup-race restore - Create schema and restore data from backup
USAGE:
clickhouse-backup restore [-t, --tables=<db>.<table>] [-m, --restore-database-mapping=<originDB>:<targetDB>[,<...>]] [--partitions=<partitions_names>] [-s, --schema] [-d, --data] [--rm, --drop] [-i, --ignore-dependencies] [--rbac] [--configs] <backup_name>
Expand All @@ -139,20 +143,22 @@ OPTIONS:
If PARTITION BY clause returns numeric not hashed values for partition_id field in system.parts table, then use --partitions=partition_id1,partition_id2 format
If PARTITION BY clause returns hashed string values, then use --partitions=('non_numeric_field_value_for_part1'),('non_numeric_field_value_for_part2') format
If PARTITION BY clause returns tuple with multiple fields, then use --partitions=(numeric_value1,'string_value1','date_or_datetime_value'),(...) format
Values depend on field types in your table, use single quotes for String and Date/DateTime related types
Values depends on field types in your table, use single quotes for String and Date/DateTime related types
Look at the system.parts partition and partition_id fields for details https://clickhouse.com/docs/en/operations/system-tables/parts/
--schema, -s Restore schema only
--data, -d Restore data only
--rm, --drop Drop exists schema objects before restore
-i, --ignore-dependencies Ignore dependencies when drop exists schema objects
--rbac, --restore-rbac, --do-restore-rbac Restore RBAC related objects
--configs, --restore-configs, --do-restore-configs Restore 'clickhouse-server' CONFIG related files
--rbac-only Restore RBAC related objects only, will skip backup data, will backup schema only if --schema added
--configs-only Restore 'clickhouse-server' configuration files only, will skip backup data, will backup schema only if --schema added
```
### CLI command - restore_remote
```
NAME:
clickhouse-backup restore_remote - Download and restore
clickhouse-backup-race restore_remote - Download and restore
USAGE:
clickhouse-backup restore_remote [--schema] [--data] [-t, --tables=<db>.<table>] [-m, --restore-database-mapping=<originDB>:<targetDB>[,<...>]] [--partitions=<partitions_names>] [--rm, --drop] [-i, --ignore-dependencies] [--rbac] [--configs] [--skip-rbac] [--skip-configs] [--resumable] <backup_name>
Expand All @@ -165,21 +171,23 @@ OPTIONS:
If PARTITION BY clause returns numeric not hashed values for partition_id field in system.parts table, then use --partitions=partition_id1,partition_id2 format
If PARTITION BY clause returns hashed string values, then use --partitions=('non_numeric_field_value_for_part1'),('non_numeric_field_value_for_part2') format
If PARTITION BY clause returns tuple with multiple fields, then use --partitions=(numeric_value1,'string_value1','date_or_datetime_value'),(...) format
Values depend on field types in your table, use single quotes for String and Date/DateTime related types
Values depends on field types in your table, use single quotes for String and Date/DateTime related types
Look at the system.parts partition and partition_id fields for details https://clickhouse.com/docs/en/operations/system-tables/parts/
--schema, -s Download and Restore schema only
--data, -d Download and Restore data only
--rm, --drop Drop schema objects before restore
-i, --ignore-dependencies Ignore dependencies when drop exists schema objects
--rbac, --restore-rbac, --do-restore-rbac Download and Restore RBAC related objects
--configs, --restore-configs, --do-restore-configs Download and Restore 'clickhouse-server' CONFIG related files
--rbac-only Restore RBAC related objects only, will skip backup data, will backup schema only if --schema added
--configs-only Restore 'clickhouse-server' configuration files only, will skip backup data, will backup schema only if --schema added
--resume, --resumable Save intermediate upload state and resume upload if backup exists on remote storage, ignored with 'remote_storage: custom' or 'use_embedded_backup_restore: true'
```
### CLI command - delete
```
NAME:
clickhouse-backup delete - Delete specific backup
clickhouse-backup-race delete - Delete specific backup
USAGE:
clickhouse-backup delete <local|remote> <backup_name>
Expand All @@ -191,10 +199,10 @@ OPTIONS:
### CLI command - default-config
```
NAME:
clickhouse-backup default-config - Print default config
clickhouse-backup-race default-config - Print default config
USAGE:
clickhouse-backup default-config [command options] [arguments...]
clickhouse-backup-race default-config [command options] [arguments...]
OPTIONS:
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
Expand All @@ -203,10 +211,10 @@ OPTIONS:
### CLI command - print-config
```
NAME:
clickhouse-backup print-config - Print current config merged with environment variables
clickhouse-backup-race print-config - Print current config merged with environment variables
USAGE:
clickhouse-backup print-config [command options] [arguments...]
clickhouse-backup-race print-config [command options] [arguments...]
OPTIONS:
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
Expand All @@ -215,10 +223,10 @@ OPTIONS:
### CLI command - clean
```
NAME:
clickhouse-backup clean - Remove data in 'shadow' folder from all 'path' folders available from 'system.disks'
clickhouse-backup-race clean - Remove data in 'shadow' folder from all 'path' folders available from 'system.disks'
USAGE:
clickhouse-backup clean [command options] [arguments...]
clickhouse-backup-race clean [command options] [arguments...]
OPTIONS:
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
Expand All @@ -227,10 +235,10 @@ OPTIONS:
### CLI command - clean_remote_broken
```
NAME:
clickhouse-backup clean_remote_broken - Remove all broken remote backups
clickhouse-backup-race clean_remote_broken - Remove all broken remote backups
USAGE:
clickhouse-backup clean_remote_broken [command options] [arguments...]
clickhouse-backup-race clean_remote_broken [command options] [arguments...]
OPTIONS:
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
Expand All @@ -239,7 +247,7 @@ OPTIONS:
### CLI command - watch
```
NAME:
clickhouse-backup watch - Run infinite loop which create full + incremental backup sequence to allow efficient backup sequences
clickhouse-backup-race watch - Run infinite loop which create full + incremental backup sequence to allow efficient backup sequences
USAGE:
clickhouse-backup watch [--watch-interval=1h] [--full-interval=24h] [--watch-backup-name-template=shard{shard}-{type}-{time:20060102150405}] [-t, --tables=<db>.<table>] [--partitions=<partitions_names>] [--schema] [--rbac] [--configs] [--skip-check-parts-columns]
Expand All @@ -253,11 +261,11 @@ OPTIONS:
--full-interval value Interval for run 'create_remote'+'delete local' when stop create incremental backup sequence and create full backup, look format https://pkg.go.dev/time#ParseDuration
--watch-backup-name-template value Template for new backup name, could contain names from system.macros, {type} - full or incremental and {time:LAYOUT}, look to https://go.dev/src/time/format.go for layout examples
--table value, --tables value, -t value Create and upload only objects which matched with table name patterns, separated by comma, allow ? and * as wildcard
--partitions partition_id Partition names, separated by comma
--partitions partition_id Partitions names, separated by comma
If PARTITION BY clause returns numeric not hashed values for partition_id field in system.parts table, then use --partitions=partition_id1,partition_id2 format
If PARTITION BY clause returns hashed string values, then use --partitions=('non_numeric_field_value_for_part1'),('non_numeric_field_value_for_part2') format
If PARTITION BY clause returns tuple with multiple fields, then use --partitions=(numeric_value1,'string_value1','date_or_datetime_value'),(...) format
Values depend on field types in your table, use single quotes for String and Date/DateTime related types
Values depends on field types in your table, use single quotes for String and Date/DateTime related types
Look at the system.parts partition and partition_id fields for details https://clickhouse.com/docs/en/operations/system-tables/parts/
--schema, -s Schemas only
--rbac, --backup-rbac, --do-backup-rbac Backup RBAC related objects only
Expand All @@ -268,10 +276,10 @@ Look at the system.parts partition and partition_id fields for details https://c
### CLI command - server
```
NAME:
clickhouse-backup server - Run API server
clickhouse-backup-race server - Run API server
USAGE:
clickhouse-backup server [command options] [arguments...]
clickhouse-backup-race server [command options] [arguments...]
OPTIONS:
--config value, -c value Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
Expand Down
Loading

0 comments on commit c2920de

Please sign in to comment.