Skip to content

Instantly share code, notes, and snippets.

@caseydriscoll
Created July 1, 2017 22:47
Show Gist options
  • Save caseydriscoll/92c8b115e6cecb19a9ad52e995002eff to your computer and use it in GitHub Desktop.
Save caseydriscoll/92c8b115e6cecb19a9ad52e995002eff to your computer and use it in GitHub Desktop.
Simple Drush backup script
#!/bin/bash
BACKUP_DATE=$(date +%Y%m%d%H%M%S)
if [[ $CI_RELEASE ]]; then
BACKUP_DATE=$CI_RELEASE
fi
drush sql-dump > ../db/$BACKUP_DATE.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment