Altinity / clickhouse-backup

Tool for easy backup and restore for ClickHouse® using object storage for backup files.
https://altinity.com
Other
1.25k stars 225 forks source link

problem when using Clickhouse backup restore #436

Closed zhanghanwei2008 closed 2 years ago

zhanghanwei2008 commented 2 years ago

Hello, I have some problem when using Clickhouse backup restore。

Slach commented 2 years ago

could you share result for the following command?

LOG_LEVEL=debug  clickhouse-backup restore -d -s -rm bak-ICC
zhanghanwei2008 commented 2 years ago

Snipaste_2022-05-01_09-15-43 Sorry, our computer can only take screenshots of errors. Please take a look. Thank you.

Slach commented 2 years ago

Please stop lie about you can't take screenshot, use https://www.i2ocr.com/ and share your screenshots as text

Which type of remote_storage do you use?

2022/05/01 09:10: 34.478122 error can't attach partitions for table 'icc.DAY FLIGHT SCHEDULE': code: 233. message: Detached part "0064ea438670602a842210d584baec92_92832_94715_94" not found

Could you share results of the following command?

ls -la /var/lib/clickhouse/backup/bak_220430/shadow/icc/DAY_FLIGHT_SCHEDULE/default/0064ea438670602a842210d584baec92_92832_94715_94

Are you sure your clickhouse-backup download bak_220430 was successful? Could you run the following commands?

clickhouse-backup delete local bak_220430
LOG_LEVEL=debug clickhouse-backup restore_remote bak_220430 > restore_remote.log
echo $? >> restore_remote.log

and share restore_remote.log?

zhanghanwei2008 commented 2 years ago
zhanghanwei2008 commented 2 years ago

We migrate the database from the source database to the target database. We package the backup of the original ch database into a tar file. We copy the tar file to the target database server. And extract the tar file to the path of var\lib\clickhouse\backup .

Slach commented 2 years ago

@zhanghanwei2008 is target database have the same path and name in SELECT * FROM system.disks as source database?

Slach commented 2 years ago

@zhanghanwei2008 is issue still relevant for you?

Slach commented 2 years ago

@zhanghanwei2008 did you run upload operation only for one server or from multiple servers with the same time?

Slach commented 2 years ago

@zhanghanwei2008 is issue still relevant for you?