Closed arikodelabs closed 2 years ago
is your destination server already contains data or not?
could you try and share the results of
LOG_LEVEL=debug clickhouse-backup restore --rm <backup_name>
?
Hello. thanks for your reply! Hope you are well , here is the output: output.log
Hope you have a great day!
Best Regards!
you replacing was wrong
after replace you got wrong engine definition
ENGINE = ReplicatedMergeTree('/replikimi/bms_dev_client_admin/shard1/builtspace_inspections', 'ck-1')()
try replace MergeTree()
instead of MergeTree
sed -i "s#ENGINE = MergeTree\(\)#ENGINE = ReplicatedMergeTree('/replikimi/$database/shard1/$table', '$2')#g" /var/lib/clickhouse/backup/$1/metadata/$database/$table.json
Hello, I have made a script that finds the string in each database and in each json file and replaces them accordingly with:
sed -i "s#ENGINE = MergeTree#ENGINE = ReplicatedMergeTree('/replikimi/$database/shard1/$table', '$2')#g" /var/lib/clickhouse/backup/$1/metadata/$database/$table.json
sed -i "s#ENGINE = AggregatingMergeTree()#ENGINE = ReplicatedAggregatingMergeTree('/replikimi/$database/shard1/$table', '$2')#g" /var/lib/clickhouse/backup/$1/metadata/$database/$table.json
The script successfully does it . however when I runclickhouse-backup restore <backupname>
It gives me some warnings and when I look into the tables of databases, they have no data and the ones that had MergeTree are not there at all?Thanks!