Difference between revisions of "User:Woozle/MySQL migration"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(Created page with "Export one database schema from local machine to cloud4's attached storage: <bash>mysqldump -uroot -p ispda_en_mw | ssh cloud4 "cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql"</...")
 
Line 1: Line 1:
 
Export one database schema from local machine to cloud4's attached storage:
 
Export one database schema from local machine to cloud4's attached storage:
 
<bash>mysqldump -uroot -p ispda_en_mw | ssh cloud4 "cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql"</bash>
 
<bash>mysqldump -uroot -p ispda_en_mw | ssh cloud4 "cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql"</bash>
 +
 +
Import one database schema from cloud1 to local folder (not yet tested):
 +
<bash>ssh cloud4 "mysqldump -uroot -p ispda_en_mw" | cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql</bash>
 
==Notes==
 
==Notes==
 
* [https://www.maketecheasier.com/ssh-pipes-linux/ How to Use SSH Pipes on Linux]
 
* [https://www.maketecheasier.com/ssh-pipes-linux/ How to Use SSH Pipes on Linux]

Revision as of 13:05, 5 July 2017

Export one database schema from local machine to cloud4's attached storage: <bash>mysqldump -uroot -p ispda_en_mw | ssh cloud4 "cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql"</bash>

Import one database schema from cloud1 to local folder (not yet tested): <bash>ssh cloud4 "mysqldump -uroot -p ispda_en_mw" | cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql</bash>

Notes