Skip to content

Commit

Permalink
add mysql docker data migration instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
thusimon committed Nov 22, 2024
1 parent b5e4636 commit 3bf8997
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
- sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- docker-compose version
### data migration
- docker exec -i <src-container-ID> mysqldump --no-tablespaces -u <username> -p<password> <database_name> > database_dump.sql
- #copy the sql file to target machine, and make sure target mysql container is running
- docker cp /path/to/destination/database_dump.sql <tar-container-ID>:/database_dump.sql
- docker exec -i <tar-container-ID> mysql -u <username> -p<password> <database_name> < database_dump.sql
## nginx
### install
- sudo yum clean metadata
Expand Down

0 comments on commit 3bf8997

Please sign in to comment.