Sync Production Database & Master Branch Code - pulibrary/pul_library_drupal GitHub Wiki

Dump Database from Staging to Production

On Staging Server

> cd /staging/drupal-root
> drush sql-dump > my.data_dump.sql
> scp my.data_dump.sql \\\@destination-server:.
> mv my.data_dump.sql prod-drupal-root
> drush sql-drop #drops all current tables
> drush sqlc < my.data_dump.sql # drush command to open db cursor and load sql-dump file

Keep Master Branch Code in Sync

> cd /my-dev-server/root
> git status # make sure you are on master branch 
> git pull origin master # get the most recent