Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kristijorgji/mysql-transporter
Move database from one mysql server to another one
https://github.com/kristijorgji/mysql-transporter
database mysql
Last synced: about 1 month ago
JSON representation
Move database from one mysql server to another one
- Host: GitHub
- URL: https://github.com/kristijorgji/mysql-transporter
- Owner: kristijorgji
- License: mit
- Created: 2021-06-18T16:14:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T13:25:05.000Z (2 months ago)
- Last Synced: 2024-10-25T15:52:08.392Z (2 months ago)
- Topics: database, mysql
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mysql-transporter
Simple scripts to export one or multiple databases from one `mysql database` to another, verison `8.0.23`
Version can be changed easily in script.
## 1. Move one or multiple databases from one mysql server to another
1. First you need to fill the env vars for source and destination databases
Start by copying the given example env vars
```bash
cp source-mysql.env.example source-mysql.env
cp dest-mysql.env.example dest-mysql.env
```
Then fill with proper values `source-mysql.env` and `dest-mysql.env`
2. Have fun, run
```bash
bash start-transfer.sh
```and grab a coffee until it finishes.
## 2. Custom insert data from one table to another based on query you write
1. Modified `src/queries`
1. `source-queries.js` are executed on source db instance/connection
2. `dest-queries.js` queries here are executed on dest instance/connection. Row data are ones selected in point a in source
2. Create `.env.local` based on example .env.example.
3. `ENVIRONMENT=local node src/index.js`## Requirements
* Docker installed
* Node for usage nr 2## License
Released under the MIT Licence. See the bundled LICENSE file for details.