Merge lp:~mterry/deja-dup/simple-threshold into lp:deja-dup/24
Status: | Merged |
---|---|
Merged at revision: | 1354 |
Proposed branch: | lp:~mterry/deja-dup/simple-threshold |
Merge into: | lp:deja-dup/24 |
Diff against target: |
281 lines (+46/-134) 9 files modified
common/CommonUtils.vala (+9/-29) data/org.gnome.DejaDup.gschema.xml.in (+5/-0) tests/Makefile.am (+0/-1) tests/backup/full (+0/-89) tests/scripts/threshold-full.test (+15/-0) tests/scripts/threshold-inc.test (+16/-0) widgets/ConfigDelete.vala (+0/-6) widgets/ConfigLabelPolicy.vala (+1/-7) widgets/ConfigPeriod.vala (+0/-2) |
To merge this branch: | bzr merge lp:~mterry/deja-dup/simple-threshold |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ken VanDine | Approve | ||
Review via email: mp+111431@code.launchpad.net |
Description of the change
Some backstory:
Deja Dup needs to make the occasional fresh, full backup. Further, it makes sure to always keep two of these around.
It does this so that it can delete old complete chains (if your backup was just one full backup a year ago and incrementals since, it couldn't delete any of it). And so that if something went wrong with one of your backups, you'll always have a second. Plus, upstream duplicity recommends the practice.
However, users have been complaining that Deja Dup makes a full backup too frequently (typically when they change the schedule to daily, which triggers monthly full backups). And some administrators have requested the ability to tune this value for their users.
This branch does a few things:
1) Allow a user/administrator to set (only via gsettings) the "how many days since the last full backup?" threshold for a new full backup.
2) Set that new setting to 90 (three months, which is the same default for weekly backups as before, but for users with daily backups, this represents a change from one month).
3) Removes UI options to backup at "two weeks" and "monthly" intervals (keeping "daily" and the default "weekly"). The user can still set a custom value in gsettings.
4) Removes UI options to only hold backups for "one month", "two months", and "three months" (keeping "six months", "one year", and the default "forever"). The user can still set a custom value in gsettings.
5) Vastly simplifies the existing 'threshold' logic to just look up in gsettings what the value should be. Previously it calculated it based on the user's delete date (divide by 2) and backup interval (multiply by 12) with clamps of (1 month, 6 months).
The reason for 3 is because I've been trying to encourage shorter backup intervals. This seemed like a good time to drop those options, while I was futzing with these things.
The reason for 4 is because if we're always keeping two full backups, spaced three months apart, the soonest we will delete anything is six months.
And while I was at it, I converted the relevant old-style test to a new-style one.
I'm having trouble figuring out how to run the new style tests, in the tests/scripts directory. It looks like I should run "make check" in the tests/runner directory, but they all fail. Tips?