We are working on a system to allow users to upload database dumps and site backups manually through a site, to ease import of external drupals or just for testing.
The requirements are as follow:
* allow arbitrary sized files (through an FTP incoming directory for example) and uploads through the file browser
* allow simple SQL dumps or complete .tar.gz, specially-formatted backups
* restrict restore to files/ or modules/ or...
* security: check the archive for files outside the drupal sites/ root, run the SQL queries with the right user...
The latter will require some changes to the restore system, i think.
Comments
Comment #1
avoine commentedI attach the two patches, one for the hosting module and the other one for the provision module.
Comment #2
adrian commentedi thought i had updated this the other day.
I like the feature, but i think that we should add the upload field to the restore page.
ie: choose this version, or upload your own.
I have concerns re: the incoming thing, especially when it comes to multiple servers / platforms. would like to discuss it more.
Comment #3
anarcat commentedThis breaks platform verification:
That mode should be 1777 or the 1770 with group www-data.
Comment #4
avoine commentedI worked more on the two patches.
Now, the upload form for a new backup is on top of the restore page. I also changed the mode of the incoming directory to 1777.
It's still primitive but it's working.
Comment #5
anarcat commentedRecent changes to the way the platform is configured makes this patch not apply cleanly anymore. Porting should be fairly easy however.
Comment #6
anarcat commentedComment #7
avoine commentedThose patches are suppose to be apply without problem.
Comment #8
anarcat commentedSo I can't get this to work.
I was able to upload a backup from my blog into a new site (new.test.hostmaster.koumbit.net). However, that backup doesn't show up in the list of backups to restore from. As it is now, that backup is sitting in the incoming directory, waiting...
So the problem seems to be that the "Incoming" tasks never gets created.
Comment #9
memtkmcc commentedNote: it is already somehow listed on the 2.0 roadmap: http://community.aegirproject.org/roadmap/2.0#Standard_archive_support
There are already two working attempts to make this happen, but both are not enough generic to include them in the core:
Hosting Drupal Gardens import
http://drupal.org/sandbox/darthsteven/1178192
Hosting upload
http://drupal.org/project/hosting_upload
The Gardens importer is promising, but the UX needs to be improved (to remove the step with creating failed add platform task) and it could support also other known archive formats, like exports from WebEnabled, plus allow archives to be in a .zip or any other format other than hardcoded .tar.gz. Anyway, available already ability to create both platform and site is a huge step forward.
The Hosting upload module allows to create new platform from uploaded or remotely fetched archive, and has also plans to extend this to support managing modules and themes (which is beyond the scope of this feature request), but offers rather good UX, and doesn't require provision part, like the Gardens importer.
I imagine that both modules could be merged to offer all-in-one new feature - ability to import a platform and existing there site (or sites) in an elegant way, with option to either define the path, URL or accept browser upload.
Of course this would require some improvements in the Create Platform form, as I wrote already here: http://drupal.org/node/1144968#comment-4474304
Comment #10
omega8cc commentedIt was me - Grace, above :)
Comment #11
steven jones commentedAh I actually quite liked the UI, minimal code to maintain for me, and minimal UI changes for the user.
As for supporting other export formats, Drupal Gardens only does tar.gz so there was absolutely no point in complicating it further by supporting others.
Is the archive format in drush now then? If it is we should totally make this happen!
Comment #12
omega8cc commentedI agree that the simpler the UI is the better, but I mean UX (user experience) here - the step with creating "failed" create platform task doesn't look good, however I understand that changing this can complicate the code under the hood.
Comment #13
joestewart commenteddrush archive-dump was backported to 4.x in April. So drush 4.4 doesn't have it but the next version should.
Comment #14
helmo commentedI like the hosting_upload UX
The backend part could be linked up with #1138882: Support drush archive-dump
Comment #15
ergonlogicMarked #1372622: Import sites from backups as a dupe of this issue.
Comment #16
ergonlogicNo activity here. Closing in favour of #2023917: Create a 'Deploy from backup' task