# Mosquitto migration from 1.x to 2.0.20

**URL:** <https://forum.cedalo.com/t/mosquitto-migration-from-1-x-to-2-0-20/1238>\
**Category:** Errors\
**Created:** [March 26, 2026, 2:23pm UTC](https://forum.cedalo.com/t/mosquitto-migration-from-1-x-to-2-0-20/1238 "2026-03-26T14:23:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akash](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@Akash](https://forum.cedalo.com/u/Akash)\
**Post date:** [March 26, 2026, 2:23pm UTC](https://forum.cedalo.com/t/mosquitto-migration-from-1-x-to-2-0-20/1238/1 "2026-03-26T14:23:33Z")

</div>

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?
