Mosquitto migration from 1.x to 2.0.20

I want to migrate Mosquitto from version 1.x to 2.0.20 on and we are using the persistent database file mosquitto.db.

When I copied the old mosquitto.db (version 1.x) to the persistence path of new mosquito (2.0.20) and started Mosquitto, it cleared the old db and created a new one. As a result, all previously stored data was lost.

Is there any solution or recommended approach to migrate Mosquitto from 1.x to 2.0.20 without losing the existing persistence data?