Backup schedule should be spread over the day

Bug #1154920 reported by Sidnei da Silva on 2013-03-14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Déjà Dup
deja-dup (Ubuntu)

Bug Description

On the Ubuntu One File Storage API we see a big spike in the number of API requests at 00:00Z, daily. Pretty much all of the requests at that time come from Deja Dup/Duplicity.

This makes it more likely that users will see errors from Ubuntu One being overloaded, like in bug 882699.

Due to a bug, we always were backing up at midnight UTC, rather than midnight local time. While fixing that, I also put in code to randomly choose a time between 2 and 4 AM (local time), rather than midnight.

[Test Case]
* Enable daily automatic backups
* Change your time zone so that it is 2AM
* Wait two hours. Deja Dup should start backing up within those two hours.

[Regression Potential]
* The only code changed was the automatic scheduler. So any regressions would be there.

Haw Loeung (hloeung) on 2013-03-14
tags: added: canonical-webops-u1
Alexander List (alexlist) wrote :

I suggest some random + exponential backoff, like in CSMA/CD or CSMA/CA:

Alexander List (alexlist) wrote : is related: feature request for detailed scheduling.

The scheduler could default to random backup, and allow overriding by the user.

Sidnei da Silva (sidnei) wrote :

Looks like the problem is fairly isolated in common/CommonUtils.vala:

in next_run_date(), it always returns the return of most_recent_scheduled_date(), or if comparing to last_run returns a negative timespan, then it adds the configured period.

Turns out that most_recent_scheduled date always returns a DateTime at 00:00Z due to the way it's computed.

Michael Terry (mterry) on 2013-03-28
Changed in deja-dup:
status: New → Fix Released
Michael Terry (mterry) wrote :

Uploaded to precise. Will subscribe ubuntu-sru. If they like it, I can upload to quantal too.

description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package deja-dup - 26.0-0ubuntu1

deja-dup (26.0-0ubuntu1) raring; urgency=low

  * New upstream release
    - Only use the GNOME Shell interface when actually in GNOME Shell,
      not something that is merely similar, like the Cinnamon shell
      (LP: #1155929)
    - When testing a restore, also use a temporary directory that is
      on the same partition as the include files (LP: #1159749)
    - Spread default backup time around a bit, from always starting at
      midnight UTC to starting between 2 and 4 AM local time
      (LP: #1154920)
    - Use more-aggressively-idle modes for ionice and nice if available
 -- Michael Terry <email address hidden> Thu, 28 Mar 2013 13:01:53 -0400

Changed in deja-dup (Ubuntu):
status: New → Fix Released

Hello Sidnei, or anyone else affected,

Accepted deja-dup into precise-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in deja-dup (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Changed in deja-dup (Ubuntu Quantal):
status: New → Triaged
importance: Undecided → Medium
Sidnei da Silva (sidnei) wrote :

Seems to fix the problem as expected.

tags: added: verification-done
removed: verification-needed
Sidnei da Silva (sidnei) wrote :

Tested 22.0-0ubuntu4 on precise by enabling -proposed.

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package deja-dup - 22.0-0ubuntu4

deja-dup (22.0-0ubuntu4) precise-proposed; urgency=low

  * debian/patches/spread-backup-epoch.patch:
    - Don't always start backup times from midnight UTC. Rather, start
      between 2-4 AM local time. LP: #1154920
 -- Michael Terry <email address hidden> Thu, 28 Mar 2013 14:01:05 -0400

Changed in deja-dup (Ubuntu Precise):
status: Fix Committed → Fix Released
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in deja-dup (Ubuntu Quantal):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers