Commit 9d9e3551 authored by anarcat's avatar anarcat

Issue #1812338 by helmo: Refactor sync back.

parent 5b130131
......@@ -59,12 +59,7 @@ function drush_provision_drupal_provision_backup() {
// synch all filesystem changes back from the remote server.
d()->service('http')->fetch(d()->site_path . '/files/');
d()->service('http')->fetch(d()->site_path . '/private/');
d()->service('http')->fetch(d()->site_path . '/modules/');
d()->service('http')->fetch(d()->site_path . '/themes/');
d()->service('http')->fetch(d()->site_path . '/libraries/');
d()->service('http')->fetch(d()->site_path . '/local.settings.php');
provision_drupal_sync_site_back();
// Check if we are currently cloaking credentials
$cloaked = d()->service('http')->cloaked_db_creds();
......
......@@ -107,6 +107,22 @@ function provision_drupal_sync_site() {
}
}
/**
* Sync the current Drupal site BACK from a slave. Call before
* running operations that need files where the slave is authoritative.
*
* E.g. before a backup is made.
*/
function provision_drupal_sync_site_back() {
// synch filesystem changes back from the remote server.
d()->service('http')->fetch(d()->site_path . '/files/');
d()->service('http')->fetch(d()->site_path . '/private/');
d()->service('http')->fetch(d()->site_path . '/modules/');
d()->service('http')->fetch(d()->site_path . '/themes/');
d()->service('http')->fetch(d()->site_path . '/libraries/');
d()->service('http')->fetch(d()->site_path . '/local.settings.php');
}
/**
* Generate a settings file for the site.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment