Skip to content

Commit

Permalink
Fixes #659: Adding cloudhooks for basic database scrubbing.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Nov 21, 2016
1 parent 7fc7ae4 commit ddebde1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions template/hooks/common/post-db-copy/db-scrub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
#
# db-copy Cloud hook: db-scrub
#
# Scrub important information from a Drupal database.
#
# Usage: db-scrub.sh site target-env db-name source-env

site="$1"
target_env="$2"
db_name="$3"
source_env="$4"

echo "$site.$target_env: Scrubbing database $db_name"
drush @$site.$target_env sql-sanitize --db=$db_name
drush @$site.$target_env cache-rebuild --db=$db_name

0 comments on commit ddebde1

Please sign in to comment.