...
What this does is clones the git repo to the target machine, moves all the site code to a timestamped directory there, updates a symbolic link pointing the document root at the new code, does the Drupal update.php procedure, reverts all features, enables all the modules enabled in the dev site, clears the cache, and a few other Drupal things. It makes a snapshot of the Drupal database before all this, but leaves the target database intact (except for the module updates), so the target site's new content is preserved.
Update Drupal modules
You can use several methods to update the modules. In Drupal, go to admin/modules/update and follow the instructions. On the command line do this:
| Code Block |
|---|
cd mysite
cd public
drush up
|
You can also update the version numbers in drupal_config/local.make, then
| Code Block |
|---|
cd mysite
cul_capistrano/do_make.sh
|
Update Drupal core & modules
The best way is to update the Drupal core version number in drupal_config/local.make then run the make file:
| Code Block |
|---|
cd mysite
cul_capistrano/do_make.sh
|
Apply patches
The best way is to update the drupal_config/local.make file with the patch info:
| Code Block |
|---|
projects[kaltura][version] = "2.0"
projects[kaltura][patch][] = "http://drupal.org/files/kaltura-1567302-dispaly.patch"
|
then run the make file:
| Code Block |
|---|
cd mysite
cul_capistrano/do_make.sh
|
Copy a remote database to the dev machine
| Code Block |
|---|
cd mysite
cap production drupal:db:grab
|
Install a database dump on remote machine
| Code Block |
|---|
cd mysite
ls backup/
README.txt staging-snapshot-20140114162844.sql
cap staging drupal:db:install -s file=backup/staging-snapshot-20140114162844.sql
|
Install a database dump on the dev machine
| Code Block |
|---|
cd mysite
ls backup/
db-features.test.library.cornell.edu staging-snapshot-2013-10-23-16-5-59.sql staging-snapshot-2013-10-28-11-44-8.sql
local-snapshot-2013-10-24-16-19-52.sql staging-snapshot-2013-10-24-11-32-41.sql staging-snapshot-2013-10-29-10-57-19.sql
production-snapshot-2013-10-30-12-35-22.sql staging-snapshot-2013-10-24-9-24-42.sql
staging-snapshot-2013-10-23-14-17-14.sql staging-snapshot-2013-10-25-13-17-23.sql
cul_capistrano/local_db_install.sh production-snapshot-2013-10-30-12-35-22.sql
|
Create a development branch
...