Skip to content

Instantly share code, notes, and snippets.

@AnthonyNixon
Created December 28, 2016 20:29
Show Gist options
  • Save AnthonyNixon/f9730c6b33f40804d94afff64b5de237 to your computer and use it in GitHub Desktop.
Save AnthonyNixon/f9730c6b33f40804d94afff64b5de237 to your computer and use it in GitHub Desktop.
rm -r backups/*
mysqldump -u root --password <PASSWORD_HERE> --all-databases > backups/backup-$(date -d "today" +"%Y-%m-%d-%H%M").sql
gsutil cp backups/* gs://<BUCKET HERE>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment