We should implement automated periodic/nightly backups. This should be fairly simple to implement, once we get #422962: Add Hosting Tasks Schedule module in. We will need to make sure older backups are removed however, which should be a separate task that would be ran (drush_invoke) in hook_post_backup...

Comments

anarcat’s picture

anarcat’s picture

There's a workaround documented here: #683610: Implement automated backups workaround.

mathieu’s picture

Subscribe.

adrian’s picture

just FYI:

in HEAD i added a useful debugging feature to the hosting-task command, in that you can now specify it in the following format :

drush @hostmaster hosting-task @site.com backup

Where site.com is the alias for the site and backup is the task you want to use.
This will actually run the task in the hosting site and also add the resultant entry to the backups table.

You could also do :

drush @hostmaster hosting-task @platform_DRUPAL616 verify

or any other task that doesnt need arguments (migrate and restore , off the top of my head).

adrian’s picture

so i think the backups should be a separate queue

but i'm trying to determine where to plug in the deleting of old backups, and whether we should be passing the list of backups to delete to the provision task, or just giving it a time and telling it to delete all pre a certain timestamp, and report back about what it removed so we can trim the table.

i think the latter suits our design better.

We should do this for 0.4 if possible.

adrian’s picture

i added this in the dev-purgebackup branch.

when the --delete_backups_older_than flag is specified for the provision-backup command, provision matches files that are older than the specified time offset, and unlinks them.

it then returns a list of files it removed, and hosting then deletes the backup table entries for eahc of the files.

it's not configurable in the tree right now, as it's hard coded to delete backups older than 1 week.

adrian’s picture

Status: Active » Needs work

this is sort of working in git.

under the dev-purgebackup branch

Bèrto ëd Sèra’s picture

subscribe

steven jones’s picture

Version: 5.x-0.2.x-dev » 6.x-0.4-alpha3

Hmm...deleting old backups after a certain threshold is a bit heavy handed. What if I want to keep around montly backups for the last year?

mvc’s picture

This would also be helpful for #974572: site node garbage collection

steven jones’s picture

As there doesn't seem to be much movement in this, I might just implement a simple backup queue as a contrib module. Seems like it would be useful to lots of people, myself included.

steven jones’s picture

A very simple automated backups module is now available here:

http://drupal.org/project/hosting_backup_queue

Anonymous’s picture

Great work Steven, and I'm sorry we haven't been around much to give you much help here.

This is a significant contribution and I hope to soon get some time / funding to focus on this and get this whole idea into Aegir proper.

Thanks!

steven jones’s picture

I've implemented the backup garbage collection here:
http://drupal.org/project/hosting_backup_gc

jackbravo’s picture

subscribe

steven jones’s picture

Project: Hosting » Hostmaster (Aegir)
Version: 6.x-0.4-alpha3 » 6.x-2.x-dev
Issue tags: +AUX Project

Tagging

steven jones’s picture

Status: Needs work » Closed (won't fix)

Now that we have these add-on modules, I don't think we need this in Aegir core.