Skip to content

Instantly share code, notes, and snippets.

@binary1230
Created October 29, 2015 00:15
Show Gist options
  • Save binary1230/2e0885dbbe861a435bab to your computer and use it in GitHub Desktop.
Save binary1230/2e0885dbbe861a435bab to your computer and use it in GitHub Desktop.
rams magfest-specific backup script
#!/bin/bash
# backup script for magfest-specific rams instances
# call this function here: https://github.com/magfest/ubersystem-deploy/blob/master/puppet/fabfile.py#L57
BACKUP_DIR=/home/dom/backup
CWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $CWD/deploy/puppet
function backup_db {
fab -u root -H $1 backup_db:dbname=$2,local_backup_dir=$BACKUP_DIR
}
backup_db [INSERT_YOUR_HOSTNAME_HERE] [INSERT_YOUR_DB_NAME_HERE]
@binary1230
Copy link
Author

that last line might look like:
backup_db something.uber.magfest.org magfest14_database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment