PowerDNS / lightningstream

Lightning Stream syncs LMDB databases through S3 buckets between multiple servers, including PowerDNS Authoritative server 4.8+ LMDBs
https://doc.powerdns.com/lightningstream/
MIT License
28 stars 16 forks source link

Experimental migrate-timestamps command #28

Closed wojas closed 1 year ago

wojas commented 1 year ago

Tested locally with old schema 3 snapshots.

I first loaded these with a non-native pdns LS config, then ran pdns to migrate the data to schema 5 (after a few changes in the code to accept schema 3). At this point the old shadow tables had proepr timestamps, but the migrated entries all had timestamp 0 (1970):

Screenshot_2023-03-07_at_15 51 55

Next I ran

lightningstream -c pdns-native.yaml experimental migrate-timestamps --add-delete-entries --database shard --src-dbi _sync_shadow_records --dst-dbi records_v5

This patched up the timestamps for the records from the old shadow tables:

Screenshot_2023-03-07_at_15 55 46

I did not test the addition of deleted records yet.