Created
October 1, 2012 09:48
-
-
Save adrienjoly/3810607 to your computer and use it in GitHub Desktop.
retrieve the backup/dump of a remote database locally
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
echo | |
echo Dumping remote database... | |
ssh -i ~/.ssh/mykey -p 8080 my@domain.com 'cd ./db;./dumpDB.sh' | |
echo | |
echo Downloading dump to ./dump... | |
scp -i ~/.ssh/mykey -P 8080 -p -r my@domain.com:/home/me/db/dump ./ | |
echo | |
echo Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment