Skip to content

Instantly share code, notes, and snippets.

@dannygsmith
Created November 12, 2017 00:02
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 dannygsmith/e8c80bdd326d56f2bb451569db0589a6 to your computer and use it in GitHub Desktop.
Save dannygsmith/e8c80bdd326d56f2bb451569db0589a6 to your computer and use it in GitHub Desktop.
Backup the blueprint database, used by wp-create
#!/usr/bin/env bash
export PATH="/usr/local/bin:$PATH";
cd "${HOME}/Sites/blueprint/"
printf -v x "%s%s.sql" "${HOME}/Sites/blueprint/" blueprint
/usr/local/bin/mysqldump --defaults-file="${HOME}/bin/my.txt" \
--add-drop-table blueprint \
> $x 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment