Last active
August 29, 2015 14:04
-
-
Save skatsuta/66020af31513718ae224 to your computer and use it in GitHub Desktop.
MySQL で dump ファイルを出力し、scp で外部サーバに転送する
This file contains 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
#!/bin/bash | |
dumpfile="dump.sql" | |
user="user" | |
host="XXX.XXX.XXX.XXX" | |
distdir="." | |
mysqldump -u root dbname > $dumpfile | |
scp $dumpfile $user@$host:$distdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment