mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fix test_backup_restore after #29649
CI: https://clickhouse-test-reports.s3.yandex.net/29856/42ca2b4bb241827edf69bbd6938d6b19c31935f1/integration_tests_(asan).html#fail1 Cc: @CurtizJ
This commit is contained in:
parent
0358d664b9
commit
b8bde2d451
@ -39,12 +39,10 @@ def get_last_backup_path(instance, database, table):
|
|||||||
return os.path.join(path_to_data, 'shadow', increment, 'data', database, table)
|
return os.path.join(path_to_data, 'shadow', increment, 'data', database, table)
|
||||||
|
|
||||||
def copy_backup_to_detached(instance, database, src_table, dst_table):
|
def copy_backup_to_detached(instance, database, src_table, dst_table):
|
||||||
fp_increment = os.path.join(path_to_data, 'shadow/increment.txt')
|
fp_backup = os.path.join(path_to_data, 'shadow', '*', 'data', database, src_table)
|
||||||
increment = instance.exec_in_container(['cat', fp_increment]).strip()
|
|
||||||
fp_backup = os.path.join(path_to_data, 'shadow', increment, 'data', database, src_table)
|
|
||||||
fp_detached = os.path.join(path_to_data, 'data', database, dst_table, 'detached')
|
fp_detached = os.path.join(path_to_data, 'data', database, dst_table, 'detached')
|
||||||
logging.debug(f'copy from {fp_backup} to {fp_detached}. increment {fp_increment}')
|
logging.debug(f'copy from {fp_backup} to {fp_detached}')
|
||||||
instance.exec_in_container(['cp', '-r', f'{fp_backup}', '-T' , f'{fp_detached}'])
|
instance.exec_in_container(['bash', '-c', f'cp -r {fp_backup} -T {fp_detached}'])
|
||||||
|
|
||||||
def test_restore(started_cluster):
|
def test_restore(started_cluster):
|
||||||
instance.query("CREATE TABLE test.tbl1 AS test.tbl")
|
instance.query("CREATE TABLE test.tbl1 AS test.tbl")
|
||||||
|
Loading…
Reference in New Issue
Block a user