Needs work
Project:
Hosting Site Backup Manager
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 Dec 2013 at 20:16 UTC
Updated:
13 Feb 2015 at 13:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ergonlogicIn backups.provision.inc, we have:
and
This seems to indicate that we could strip the '.gz' from the 'backup_file' Drush option in a new drush_provision_drupal_pre_provision_backup() function. If that's the case, we could add settings to control this on the front-end, in contrib even.
Comment #2
helmo commentedI still hope to delegate backups to drush archive-dump someday... but this looks possible.
Comment #3
gboudrias commentedI've implemented the file name change in a testing module, and I've encountered the following error:
It seems like it doesn't take the file name into account when restoring.
I'm working on a patch.
Comment #4
gboudrias commentedSorry I meant the backup works as intended (no gzipping), but the restore fails.
Comment #5
gboudrias commentedSee issue in Provision project: https://drupal.org/node/2169025
Comment #6
ergonlogicSince most of the development of new backup functionality is happening in hosting_site_backup_manager, this feature request probably deserves to be here for now. It may even be merged into Aegir 3.x.
Since un-compressed backups are easily 10x the size, we presumably only want to do this occasionally, and we might want to garbage collect them right away. This would probably mean adding a checkbox on backup (?), clone, and migrate task forms, and having to pass a 'no-gzip' flag to the back-end on these tasks.
Comment #7
gboudrias commentedWhat about the backup queue? Maybe there should be an option in the site's edit form for uncompressed backups. Although that doesn't invalidate the need for a checkbox in the backup forms.
Comment #8
gboudrias commentedI'm working on this btw, implementing the solution largely as described in #6. It will be a new feature.
I'm about 60% of the way through.
Comment #9
gboudrias commentedI'm stuck at getting the backup name change to the backend.
Comment #10
gboudrias commentedCreated temporary fork on github: https://github.com/gboudrias/hosting-site-backup-manager-tmp-fork
Comment #11
helmo commentedYour drush_hosting_backup_nogzip_pre_provision_backup() hook is not called because it's not in the right context.
While drush_hosting_backup_nogzip_pre_hosting_task runs in the context of a hostmaster site, the actual backup is done in the context of the site to be backed up.
So to make the hook work it needs to reside in ~/.drush. That's also the reason why many aegir contribs have a provision_ and a hosting_ d.o. project.
Here's also a patch against your github copy to make it work after you move the drush.inc file.
Still needs more cleanup though ;)
Comment #12
gboudrias commentedThanks a bunch!
I've pushed your changes to my fork, as well as condensed them in the attached patch. Note that I've removed the temporary code for future features.
For this feature, we'd either need instructions in the README or a hsbm_provision module. The latter seems a little overkill for an optional feature. What do you think?
Comment #13
helmo commentedThere already is a https://drupal.org/project/provision_site_backup_manager module :)
You can submit a patch for that module in this same issue.
A few notes:
maybe needs an if to avoid a PHP notice.
The comment above drush_hosting_backup_nogzip_pre_provision_backup() is incorrect.
Questions:
Is a restore task working? (see #3)
Comment #14
gboudrias commentedWow, that's good to know!
I've moved my changes to the provision module, so this is a patch for the provision module, plus a patch for this module (non-provision part) that doesn't include the .drush.inc file anymore. (I've also pushed the changes to my temporary fork if you prefer a messy history).
Task restoring works if you use the Provision patch in https://drupal.org/node/2169025 :) There wouldn't be a way for it to work otherwise.
Comment #15
gboudrias commentedTurns out the function names are wrong in that last patch. I don't know if it's worth another patch, but you might want to fix that before committing...
Comment #16
ergonlogicWe ran some benchmarks to better understand the repercussions of skipping gzipping during backups. We only considered clone, where we then also deleted the uncompressed backup. We used vmstat to pull stats at 1-second intervals. Here are the results of our (admittedly) small sample (3 runs each with and without gzipping):
Execution time and I/O dropped by more than half. CPU usage dropped moderately, and memory usage went up fairly significantly.
Comment #17
gboudrias commentedI think ergonlogic reviewed this for our benchmarks. Please commit and/or review some more.
Comment #18
helmo commentedWhere is this submit handler?
As you mentioned in #15 this needs a bit of work... did you mean hosting_backup_nogzip_form_alter?
Comment #19
helmo commented