Created
September 19, 2025 00:49
-
-
Save denihida1216/dbfdaf93d1d62abb51c74dff1d207d02 to your computer and use it in GitHub Desktop.
docker backup & restore db mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| copy file local to server | |
| scp /nama_folder_lokal/backup.sql [email protected]:/nama_folder/ | |
| copy file server to local | |
| scp [email protected]:/nama_folder/backup.sql /nama_folder_lokal/ | |
| backup db mysql | |
| docker exec -i mysql mysqldump -u root -p --skip-set-charset nama_database > backup.sql | |
| restore db mysql | |
| docker exec -i mysql mysql -u root -p nama_database < /nama_folder/backup.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment