Skip to content

Instantly share code, notes, and snippets.

@bjeavons
Created May 31, 2012 15:29
Show Gist options
  • Save bjeavons/2844167 to your computer and use it in GitHub Desktop.
Save bjeavons/2844167 to your computer and use it in GitHub Desktop.
Download database from Acquia for any alias
#!/usr/bin/env bash
# Usage: FILE [site-alias] [file]
# Note: do not provide @ symbol for alias
# e.g.: a-dl-dbs acquiacom.prod prod-insight-insight-2012-05-29.sql.gz
HOST=`drush sa --component=remote-host @$1`
USER=`drush sa --component=remote-user @$1`
scp $USER@$HOST:/mnt/files/$1/backups/$2 $2 && chmod 600 $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment