Re: Scheduling 3 periodic jobs using systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Could you please explain the idea behind this proposal?


Am 2024-07-12 11:53, schrieb Barry Scott:



On 12 Jul 2024, at 09:50, t.schneider@xxxxxxxxxxx wrote:

There's no script (or whatsoever) in this backup functionality.
It's only rsnapshot (https://wiki.archlinux.org/title/Rsnapshot) and systemd-timer involved.

 
You can change the ExecStart= to use flock, see man flock for details.
 
Off the top of my head something like:
ExecStart=flock --exclusive mylock rsnapshot
 
Add in full paths to make it robust.
 
Barry
 


Am 2024-07-12 10:35, schrieb Barry Scott:



On 12 Jul 2024, at 08:34, t.schneider@xxxxxxxxxxx wrote:

Setting the time of day requires detailed knowledge about the runtime of each job.

But this forecast is not accurate and this means any setting could result in same error.

Agreed that is a problem with this approach.
 
Or you have the code that locks wait for the lock to be freed does that help?
Are you using flock in the script, then its a easy change.
 
You still cannot ensure the order, but you can ensure that they will all run sequentially.
 
Personally I encode the rules for my incremental vs. full backup into my hourly backups script.
So I only have one timer.
 
Barry
 

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux