[systemd-devel] Scheduling 3 periodic jobs using systemd
Leon Fauster
leonfauster at googlemail.com
Fri Jul 12 15:19:49 UTC 2024
Am 12.07.24 um 16:02 schrieb Barry Scott:
>
>
>> On 12 Jul 2024, at 11:08, t.schneider at disroot.org wrote:
>>
>> Could you please explain the idea behind this proposal?
>>
> I assume you run three different services to do the backups.
> Each with different parameters, month, weeek, day config.
>
> flock allows you serialise the access to a resource, in your case "doing
> a backup".
>
> Read man flock to undertstand what flock does and what the command
> should be.
>
> Barry
>
OT:
rsnapshot's monthly and weekly argument triggers just a directory
renaming (weekly.3->montly.0), and it rm the last monthly directory
(the only time consuming part, depended on the size of the backup).
So, the race can be easily avoided. Rsnapshot cron looks usually like
this
50 6 * * * root ... daily
30 6 1,9,17,25 * * root ... weekly
10 6 1 * * root ... monthly
--
Leon
More information about the systemd-devel
mailing list