I'm using an aegir instance installed by the latest v. BOA-2.2.5. Not quite sure what version of the GC module is included in that, but should be the latest I suppose.

And I'm using the "Hosting backup garbage collection" settings described in the example:

https://drupal.org/node/1895538

I get 8 automatic daily backups. Each day a new backup is made and oldest daily is deleted. But there's no weekly or monthly (4 weeks) backups retained. Just those 8 dailies.

I've tried various diddling with the settings, but the example (link above) seems clear enough.

I see three possibilities:

1) I'm doing something goofy in my setup
2) the design behavior changed since that example configuration (Created by muschpusch on January 22, 2013)
3) A logic bug creeped in.

Does anyone have GC working as expected? Any suggestions appreciated.

-- Cronin

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo’s picture

Project: Hosting backup garbage collection » Hosting Site Backup Manager
Version: 6.x-1.2 » 7.x-3.x-dev

The code for this module has moved to hosting_site_backup_manager.

fuzzy76’s picture

I know it's deprecated, but FWIW I'm seeing this with Hosting Site Backup Manager 6.x-2.0 as well.

fuzzy76’s picture

This is probably also the same as #2159535: The backup schedule isn't followed

colan’s picture

Title: Only daily backups retained, no weeklies or montlies » Only daily backups retained, no weeklies or monthlies
Status: Active » Postponed (maintainer needs more info)

Can someone confirm that this is still happening in Aegir 3 (7.x-3.x)?

If so, we need to fix there first (and then it can be backported). Otherwise, someone can directly fix this in Aegir 2 (6.x-2.x).

Jon Pugh’s picture

Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active

Definitely NOT seeing backups happening!

Marking Major... even though I want to mark it critical.

Jon Pugh’s picture

Sorry, I misread.

I'm not getting any backups on schedule at all...

Jon Pugh’s picture

Ok, it's too early for issue reporting!

My queue was off, sorry about that.

Still think this is a major problem, though ;)

colan’s picture

Status: Active » Postponed (maintainer needs more info)
Related issues: +#2756411: Backup tasks are not being generated

So still waiting for confirmation in 3. When testing, please make sure you've got a version of the module from June 30th or later to account for #2756411: Backup tasks are not being generated.

Let's leave as Major. Critical would mean that none of the schedules are working.

Neograph734’s picture

Cross-posting from #2756411: Backup tasks are not being generated:

A combination of the dev version of Hosting along with the dev version of Hosting Site Backup Manager is required (both have not received an update since the patches) for backups to work. Having the development version of one of them likely does not work either.

I can confirm dailies work. Never tried weeklies.

northstowe’s picture

FileSize
28.04 KB
12.56 KB

"So still waiting for confirmation in 3."

I can confirm that we are seeing this in 7.x-3.9 on a test site upgraded from 6.x-2.1 - where we also see the issue.

Using settings:

backup garbage collection settings

We have 8 daily backups only, task log confirms deletion of backups that are expected to be retained.

task log

Andy

colan’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks! Patches welcome.

northstowe’s picture

Version: 7.x-3.x-dev » 7.x-3.9
Status: Active » Needs review
FileSize
713 bytes

I have discovered that there is a small difference between the function that chooses backups to remove and the function to generate the example backup schedule on the Hosting->Backup Manager page and that appears to be the cause of this issue.

In hosting_backup_gc_compute_backups_to_remove() it uses the difference between current time and the backup timestamp to decide which backups are in the same pocket of time, in _hosting_backup_gc_example() it uses the backup timestamp.

By using the difference it introduces less variance between the values for the pocket resulting in backups intended to be retained as weeklies being 'pocketed' with more recent backups and thus deleted. In my debugging I found that the actual results of dividing the difference by the period were 2.0002 and 2.278 for two backups - so both 'floor'ed to '2' whereas dividing the timestamp by the period yielded 'floor'ed values of 2459 and 2460 so the weekly gets retained.

Simple patch attached

  • helmo committed cbd7b6f on 7.x-3.x authored by northstowe
    Issue #2270539 by northstowe: Only daily backups retained, no weeklies...
helmo’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.