Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2012 at 14:13 UTC
Updated:
12 May 2015 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
steven jones commentedThis is an issue with Aegir itself.
Maybe we should add an option to the delete task to remove backups while we're deleting.
Comment #2
AquaticDisorder commented@darthsteven plus one for the option.
Agreed, I'm not convinced aegir should default to deleting site backups when deleting associated sites.
One scenario I can think of would be if I deleted the wrong site accidentally and wish to restore from backup.
Another, I screwed up my site, so I delete it with the intention of restoring the most recent backup.
Comment #3
marafa commentedso .. a backup manager is what you are talking about? will it be able to do restores?
Comment #4
AquaticDisorder commentedAegir has a restore task on the site node, however if a user were to inadvertently delete a site then that's when the backup is needed.
Aegir also has a task to delete backups on the site node, so along with garbage collection settings it's coverered really, but it wouldn't hurt to have a prompt when deleting a site I think.
Comment #5
Anonymous (not verified) commentedPersonally I don't think we should delete backups when we delete a site. The first person to do so accidentally will come screaming to us that it defeats the purpose of taking a backup in the first place.
I agree with #1, #2 and #4, and would consider some sort of boolean checkbox in the delete form 'delete backups too?' that is false by default.
Comment #6
anarcat commentedagreed. do not delete old site's backups by default.
especially since i think we should not backup when we disable a site, btw.
Comment #7
danepowell commentedI wrote a patch for hosting_backup_gc that deletes backups for enabled/disabled/deleted sites on separate schedules, so you can (for example) keep nightly backups of enabled sites but only a single backup of deleted sites.
The only problem is that it's apparently not possible to run the backup_delete provision task on a deleted site... in effect, once a site is deleted, if any backups still remain, there's simply no way to delete them without manually removing the file and records from the DB. Is that correct? What do people think of this solution in general?
Comment #8
steven jones commentedHmm...good question. Not sure about how to fix this one. Maybe for certain tasks on deleted sites we need to create the context, delete the backups, delete the context.
Comment #9
themusician commentedI really like the idea of adding a checkbox to delete backups when deleting a site from Aegir. Developers, myself included on our Aegir system love to pull down live sites to our dev server, make a few changes, test and then replicate on the live site. Once this is done, we delete the site.
When we pull down a site to test the migration to a new platform a backup is automatically created and never deleted, even if we delete the site. That means we have 263 backups that I need to manually delete or nearly 28GB of data, that is never intended to be used.
The checkbox has the added benefit of giving the site owner total control of whether or not to delete all of the backups.
Comment #10
danepowell commented@Steven Jones - should I open a new issue for this (running tasks on deleted sites)?
Specifically, the error I get when trying to run backup_delete on a deleted site is
I tried to create a site context before running the backup_delete task using the attached patch, but it didn't seem to help. I could be going about this completely the wrong way- I would appreciate any guidance.
Comment #11
rosk0Agreed with #5
Comment #12
steven jones commentedComment #13
chertzogWhat about something like this?
Because we pushed the submit handler to the beginning of the #submit array, the delete backups task should run before the delete task, thus have no issue with drush aliases (assuming im understanding things correctly.
Comment #14
ergonlogicI think you'd need to iterate over all the site's backups. So you'd need to make sure they all get queued before the site delete task. But otherwise, this looks like the right approach.
Comment #15
anarcat commentedComment #16
ergonlogicNew features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.
Comment #17
marafa commentedso now we are talking about an option to delete backups on site delete. the question is, what happens to the backups if they arent deleted at site deletion?
will they age normally and be cleaned up by backup_gc? we dont need them lying around taking up space. so, if the rule says keep them around for a week, that rule should be valid even if the site has been deleted.
Comment #18
ergonlogicThe solution in #13 looks pretty close. It might be nice to have a global option too. Something along the lines of:
Also, by deleting the backups first, we'll still have the final pre-delete backup available as a safety-net.
Comment #19
ergonlogicComment #20
themusician commentedHooray :)