Created
June 1, 2017 02:38
-
-
Save marushu/d7649395fb8067bd146ca3e7bc311823 to your computer and use it in GitHub Desktop.
Backup from remote datas.
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/sh | |
# Important!! Run this command in the vccw directory. | |
# Backup from remote | |
# - Login to vagrant | |
# - Fire wordmove pull -tup | |
# - Make backup.sql | |
# - Download backup.sql using scp. | |
# - Fire wp db import and search-replace. | |
vagrant ssh -c "cd /vagrant && wordmove pull -tpu" && ssh nickname -t "cd /path/to/wordpress && /path/to/wp-cli db export backup.sql" && scp nickname:/path/to/wordpress/backup.sql . && cd /path/to/wordpress && wp db import /path/to/backup.sql && wp search-replace 'remote(old)' 'local(new)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment