Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.The backup works FINE... however the export task fails for a D8 site:
Error: Call to undefined function variable_get() in /data2/aegir/hostmaster-7.x-3.x-2015-09-11-1331/profiles/hostmaster/modules/aegir/hosting_site_backup_manager/hosting_site_backup_manager.inc, line 12
The task seems to be run in the context of the hosted site, and fails on using the variable_get function which was renamed in D8. I think that such a task should be more something for the hostmaster context.
Any idea if we have another task which does that already?
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | support_exporting_d8-2619074-16.patch | 2.27 KB | helmo |
| #13 | 0001-Workaround-for-aegir_backup_export_path.patch | 1.69 KB | memtkmcc |
| #9 | 2619074-remove-varget_2.patch | 3.51 KB | Jon Pugh |











Comments
Comment #2
MrAdamJohn CreditAttribution: MrAdamJohn commentedWhen running this - I did not experience "backup fine". There was no backup in the appropriate directory.
Comment #3
Jon PughFYI there is only one function in this entire file... There's a better way to do this, for sure...
Looking into it.
Comment #4
Jon PughIf someone can take this all you have to do is:L
1. Remove hosting_site_backup_manager.inc.
2. Search and replace:
_hosting_site_backup_manager_get_backup_export_root();
for
drush_get_option('aegir_backups_path', '/var/aegir/backup-exports');
Not sure if there was a reason for the include and the helper function. Maybe someone wanted the site itself to define it's own backup path?
Comment #5
Jon PughPatch attached!
Comment #6
Jon PughBetter patch. This one uses variable_get() when appropriate... I think :)
needs a little more testing, will get back to you.
Comment #7
Jon PughComment #8
gboudrias CreditAttribution: gboudrias commentedSeems to work, with a warning:
This is the line:
include_once dirname(__FILE__) . '/../hosting_site_backup_manager.inc';Did we just forget to remove it? It doesn't seem to do anything.
Marking as "needs work" just in case, but for those in a hurry I can confirm the current patch (#7) will do the job.
Comment #9
Jon PughAh, I didn't see that one. Funny, the include statement appeared. twice. New patch attached!
Comment #11
gboudrias CreditAttribution: gboudrias commentedThanks, I tested and committed your patch. You rock.
Comment #12
memtkmcc CreditAttribution: memtkmcc commentedThis change breaks support for
aegir_backup_export_pathvariable completely. There reason the helper file was in place, is that otherwise the backend couldn't accessaegir_backup_export_pathvariable, which is stored in the database, and against assumption here, is not stored anywhere as a drush option, so the only method to access it is via_hosting_site_backup_manager_get_backup_export_root()wrapper, orvariable_get()directly.In short, this code will always default to
/var/aegir/backup-exports, but you will never notice this, unless your Aegir root is different than/var/aegir, like it is in every BOA instance.Comment #13
memtkmcc CreditAttribution: memtkmcc commentedAttached is a working workaround. Note that it only hides the problem, because
aegir_backup_export_pathis not used here anyway. By the way, how are we supposed to be able to use this variable, if it is not set anywhere in the code? There is just no such variable and no such drush option anywhere.Comment #14
memtkmcc CreditAttribution: memtkmcc commentedAnd there is still one, now useless line:
Comment #15
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedIt's good to note that drush_get_option and variable_get use difference storage... so this would have to be set in two places now :(
The idea of the _hosting_site_backup_manager_get_backup_export_root() function was to centralize that.. missing the fact that variable_get is not available in all Drush contexts.
Comment #16
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedSetting the aegir_backup_export_path variable can be done via a drushrc file .. I've started to document a few of those options in provision.api.php
But it's still weird to have it in two places ... this new patch therefore renames the drush side to
provision_backup_export_path.And it adds a bit to the README file.
Comment #18
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedI jammed in even a bit more comment ... and committed.