I would like to fetch a drupal site from any remote server with the 'Sync Data' task

And it shouldn't be too hard as we mostly utilize Drush for this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo created an issue. See original summary.

helmo’s picture

Issue summary: View changes
Status: Active » Needs work
FileSize
1.06 KB

The UI turned out to be simple... the backend it not functional yet... I have to debug some more.

It might be good to add an extra permission for this... or a setting to disable it globally.

helmo’s picture

Status: Needs work » Needs review
FileSize
1.83 KB

It turns out that no backend changes are needed. I just added a bit of documentation on how to create a custom Drush alias for this purpose.

It needs two aegir specific lines, which I documented in a new README file.

One limitation I found is that the remote site needs to be multi site ... A workaround is to create a symlink on the remote site from sites/ to sites/default.
We could change our sync code to make use of drush path aliases to really fix that.

helmo’s picture

fixed a case where no other sites were available for sync. Custom option should then still be shown.

helmo’s picture

I re-discovered #2407309: Allow sync from any alias.

Here's a combined patch.

One valid point from #2407309-5: Allow sync from any alias., "the files sync assumes files are at `sites/SITENAME/files` which it often isn't."

helmo’s picture

Status: Needs review » Fixed

Committed, and added a new issue #2641170: Use drush path aliases? for the remaining point from #5

  • helmo committed a1e3771 on 7.x-3.x
    Issue #2585379 by helmo: Let the sync task work on any Drush alias
    
helmo’s picture

Issue tags: +Aegir 3.3

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Jon Pugh’s picture

> It needs two aegir specific lines, which I documented in a new README file.

It would be nice if we could figure out how to avoid needing this...

Wouldn't it be safe to assume that if no "context_type" exists then it is a site?

Jon Pugh’s picture

Also I'm not seeing the new README you mention...

http://cgit.drupalcode.org/hosting_tasks_extra/tree/hosting_sync/README.md

Jon Pugh’s picture

I added the parts to my drush aliases and now I get an error:

'context_type' => 'site',
'server' => '@server_master',

Error: Call to a member function get_services() on a non-object in /var/aegir/.drush/commands/provision/Provision/Context.php, line 298

I dug in and found "parent_key" to be "platform", so I am assuming it is looking for the "platform" property.