#490196 randomise the time when backupninja runs on a given host

#490196#5
Date:
2008-07-10 16:42:27 UTC
From:
To:
backupninja runs by default at 01:00 every day. This means that at
one in the morning, the backup server is being hammered upon. Of
course, I can adjust that, but it would be nice if backupninja
included some randomisation of the time it runs, e.g. by asking for
a window in which it should run.

#490196#10
Date:
2010-01-05 14:28:27 UTC
From:
To:
Hi,

Agreed, patches welcome!

Bye,
--
  intrigeri <intrigeri@boum.org>
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr-fingerprint.asc
  | Then we'll come from the shadows.

#490196#15
Date:
2010-01-05 22:13:47 UTC
From:
To:
also sprach intrigeri <intrigeri@boum.org> [2010.01.06.0328 +1300]:

What is the reason that backupninja implements its own scheduling
(which can be overridden with -n)? Why not just set it up with cron
properly?

#490196#20
Date:
2010-01-09 00:46:09 UTC
From:
To:
Hi,

also sprach martin f krafft wrote (05 Jan 2010 22:13:47 GMT) :

Thinking about it, I must admit I don't understand why the original
author designed the scheduling thing like this. Probably the wish for
a more user-friendly configuration language, I guess.

Anyway, I'm in favour of switching to cron; this implies:

* on the Debian packaging side, translating and migrating the
  configuration on upgrade, as best as possible (jobs can specify
  their own scheduling, which complicates the process a fair bit)
* documentation work for non-Debian users.

As always, patches are welcome, as it's pretty unlikely anyone in the
current backupninja dev team will have time to implement this.

Bye,

#490196#25
Date:
2010-01-10 22:58:38 UTC
From:
To:
also sprach intrigeri <intrigeri@boum.org> [2010.01.09.1346 +1300]:
think?

But it can be done non-intrusively, simply by turning things around:
right now, cron gets run regularly, and the backupninja stuff
specifies the time. If we can somehow set the backupninja time to
'now' or 'every minute' or 'always', then we can get cron to invoke
backupninja at a specific (randomised) point in time.

I will talk to Micah next week when I see him about this.

#490196#30
Date:
2010-01-13 21:19:56 UTC
From:
To:
Hi,

martin f krafft wrote (10 Jan 2010 22:58:38 GMT) :

Well, more or less the same people are upstream and do the
Debian packaging. But sure, a generic migration script could be
included upstream and run by postinst when needed.

I believe I understood what you were meaning the first time, but it
seems I did not express myself in a clear enough way.

I was actually talking of migrating the configuration of people who
have already configured their backupninja scheduling, and do not want
to get it randomized. This implies:
- to turn backupninja own scheduling to some thing like the "always"
  you're suggesting
- to create new cronjobs running at the same time that was originally
  configured with "when =" in backupninja.conf or in a particular job
  in /etc/backup.d/

Then the ones who want it randomized can turn any needed switch on,
and the others keep the same behaviour they have configured.
I've not thought ye about what the default for new installs should be.

Bye,

#490196#35
Date:
2010-01-13 22:39:32 UTC
From:
To:
also sprach intrigeri <intrigeri@boum.org> [2010.01.14.1019 +1300]:

Yeah, this sounds right:

1. migrate existing configuration from backupninja when= to cron,
although that will be hard or impossible if the schedule times for
jobs diverges.

2. provide a switch to wait a random interval. this could be done
inside backupninja and we wouldn't need cron even.

Another, possibly better solution, would simply be to randomise the
when parameter in the config file on installation.