Skip to content

Instantly share code, notes, and snippets.

@Sillson
Created January 10, 2017 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sillson/5b032a23a5b09b5233075164fdc787eb to your computer and use it in GitHub Desktop.
Save Sillson/5b032a23a5b09b5233075164fdc787eb to your computer and use it in GitHub Desktop.
Download a remote bz2 sql backup, and dump into a remote DB.
echo "Downloading the latest backup from the Core Servers"
echo
curl --insecure -O https://wherever-bz2-backup-origin.sql
echo "Download complete"
echo
echo "Unzipping this beast, and plopping it right in the core db on AWS"
echo
bunzip2 < backup.sql.bz2 | mysql -u [USER] -pw[PW] --host [HOST] [DBNAME]
echo "Finished"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment