- Preform a backup of your database you wish to migrate and store that backup somewhere secure
- Create a new database on your choice of database engine (mysql or pg, sqlite will be created automatically)
- Nodejs v14/v16
- Yarn
yarn
- Choose which database you are migrating to (sqlite, mysql, pg)
- Copy the corresponding
.env.DBTYPE.example
file to.env
using something likecp .env.pg.example .env
- Modify the configuration in the
.env
to match your MongoDB source and your SQL destination
- Start by following the "prepare the migration locally" guide on our documentation to do any needed code changes
- Run your SQL Strapi v3 in
develop
mode with an empty DB to generate the DB structure - Turn off / kill the running SQL Strapi v3 server
- Run migration script using
yarn start
- Run your SQL Strapi v3 using
yarn develop
mode with the migrated DB to test the migration