Skip to content

Instantly share code, notes, and snippets.

@nrambeck
Created January 22, 2013 00:36
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 nrambeck/4590997 to your computer and use it in GitHub Desktop.
Save nrambeck/4590997 to your computer and use it in GitHub Desktop.
Drupal shell script to sync dev site to a local environment
#!/bin/bash
if [ ! $1 ]; then
echo "Usage:"
echo " $0 site_shortname"
echo "Example:"
echo " $0 acme"
exit
fi
echo "Syncing database from DEV to LOCAL"
drush sql-sync --temp --no-cache @$1.dev @$1.local -y
echo "Syncing files from DEV to LOCAL"
drush rsync -O @$1.dev:%files @$1.local:%files -y
drush cc all
echo "Sync complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment