Staging Server Clone from Production - pulibrary/pul_library_drupal GitHub Wiki

Note all of this should be automated just sketching out the steps

On Production Server

> drush @prod sql-dump > YYYY.MM.DD.prod.sql
> tar -cf files.prod.2013.01.31.tar files/

On Staging Server

> cd /var/www/apps/library-stage
> drush sql-dump > ~/library.stage.2013.01.31.sql
> drush sql-drop
> drush sqlc < YYYY.MM.DD.sql # from prod server above

clear redis

> redis-cli
redis 127.0.0.1:6379> FLUSHALL
OK
redis 127.0.0.1:6379> exit

Clear and Rebuild Indexes

> drush sapi-c
> drush sapi-i #why doesn't this work for all 

update files directory

> sync files directories with script......

clear caches

> drush cc-all