Proper way of replacing Repliced Merge Tree and aggravated merge tree
As I said in my previous post, I made a script which replaces the strings in backups by database and table name , you've said that I had made a mistake in my script but I changed it and will show the results:
So I used
sed -i "s#ENGINE = MergeTree[(][)]#ENGINE = ReplicatedMergeTree('/replikimi/$c/shard1/$table', '$2')#g" /var/lib/clickhouse/backup/$1/metadata/$c/$table.json
and
sed -i "s#ENGINE = AggregatingMergeTree[(][)]#ENGINE = ReplicatedAggregatingMergeTree('/replikimi/$c/shard1/$table', '$2')#g" /var/lib/clickhouse/backup/$1/metadata/$c/$table.json
and the result is = ENGINE = ReplicatedMergeTree('/replikimi/bms_qa_democlient/shard1/point_time_series', 'ck-1') PARTITION BY
which means it was successful, and same goes for aggregatingmergetree
ENGINE = ReplicatedAggregatingMergeTree('/replikimi/bms_qa_clientone/shard1/point_time_series_week', 'ck-1') PARTITION BY
Here is the log files upon doing clickhouse-backup restore shard_replica >& outputi.log
And some tables are missing such as "point_time_series", but in the backup the json file with the data exists
could you try read logs and try to figure out before just share?
2022/06/08 12:11:07.405323 info CREATE TABLE bms_qa_dio.quercus_reservation
(`connector_id` String, `building_id` String, `reservation_id` String, `user_id` String, `startDate` Nullable(Date), `endDate` Nullable(Date), `parkingSpotId` Nullable(UInt32), `isOvernight` UInt8 DEFAULT toUInt8(0), `requestedParkingType` Nullable(String), `assignedParkingType` Nullable(String), `status` Nullable(String), `isMonthly` UInt8 DEFAULT toUInt8(0), `isEmployee` UInt8 DEFAULT toUInt8(1), `event_time_local` DateTime, `event_time_utc` DateTime('UTC'), `collected_at` DateTime('UTC'))
ENGINE = ReplicatedMergeTree('/replikimi/bms_qa_dio/shard1/quercus_reservation', 'ck-1') PARTITION BY toYYYYMM(event_time_local) ORDER BY (connector_id, event_time_local) SETTINGS index_granularity = 8192
2022/06/08 12:11:07.672375 warn can't create table 'bms_qa_dio.quercus_reservation':
code: 253, message: Replica /replikimi/bms_qa_dio/shard1/quercus_reservation/replicas/ck-1 already exists,
will try again backup=shard_replica operation=restore
Do you use the same zookeeper servers on destination clickhouse server as source clickhouse server?
try to use --tables=*point_time_series
and look to the log
you don't answer to my question
I will keep you updated, working with my colleagues
so, is the issue still reasonable for you?
close after inactivty