Simple scripts to export one or multiple databases from one mysql database
to another, version 8.0.33
Version can be changed easily in script.
- First you need to fill the env vars for source and destination databases
Start by copying the given example env vars
Then fill with proper values
cp source-mysql.env.example source-mysql.env cp dest-mysql.env.example dest-mysql.env
source-mysql.env
anddest-mysql.env
- Have fun, run
bash start-transfer.sh
and grab a coffee until it finishes.
- Modified
src/queries
source-queries.js
are executed on source db instance/connectiondest-queries.js
queries here are executed on dest instance/connection. Row data are ones selected in point a in source
- Create
.env.local
based on example .env.example. ENVIRONMENT=local node src/index.js
- Docker installed
- Node for usage nr 2
Released under the MIT Licence. See the bundled LICENSE file for details.