mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-08 23:42:02 +00:00
22 lines
657 B
Bash
Executable File
22 lines
657 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
${CLICKHOUSE_CLIENT} -nm --query "
|
|
drop table if exists test;
|
|
create table test (a Int32) engine = MergeTree() order by tuple();
|
|
"
|
|
|
|
backup_id=${CLICKHOUSE_TEST_UNIQUE_NAME}
|
|
backup_name="Disk('backups', '$backup_id')";
|
|
|
|
${CLICKHOUSE_CLIENT} -nm --query "
|
|
backup table ${CLICKHOUSE_DATABASE}.test to $backup_name;
|
|
" | grep -o "BACKUP_CREATED"
|
|
|
|
${CLICKHOUSE_CLIENT} -nm --query "
|
|
select ProfileEvents['BackupEntriesCollectorMicroseconds'] > 10 from system.backups where name='Disk(\'backups\', \'$backup_id\')'
|
|
"
|