<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p style="color: #333333; font-size: 13px; font-family: sans-serif; background-color: #fcfdfe;">Hello,<br style="font-family: sans-serif !important;" />I have a backup job (using rsnapshot) that must be executed daily, weekly and monthly.<br style="font-family: sans-serif !important;" />Therefore I created these systemd-timers:</p>
<div class="codebox" style="color: #222222; font-size: 13px; font-family: sans-serif;">
<pre class="vscroll" style="font-size: 1em; font-family: monospace !important; font-weight: normal;"><code style="font-size: 1em; font-family: monospace !important;"># /etc/systemd/system/rsnapshot-daily.timer
[Unit]
Description=rsnapshot daily backup

[Timer]
OnCalendar=daily
RandomizedDelaySec=10m
Persistent=true
Unit=rsnapshot@daily.service

[Install]
WantedBy=timers.target

# /etc/systemd/system/rsnapshot-weekly.timer
[Unit]
Description=rsnapshot weekly backup

[Timer]
OnCalendar=weekly
RandomizedDelaySec=10m
Persistent=true
Unit=rsnapshot@weekly.service

[Install]
WantedBy=timers.target

# /etc/systemd/system/rsnapshot-monthly.timer
[Unit]
Description=rsnapshot monthly backup

[Timer]
OnCalendar=monthly
RandomizedDelaySec=10m
Persistent=true
Unit=rsnapshot@monthly.service

[Install]
WantedBy=timers.target</code></pre>
</div>
<p style="color: #333333; font-size: 13px; font-family: sans-serif; background-color: #fcfdfe;"> </p>
<p style="color: #333333; font-size: 13px; font-family: sans-serif; background-color: #fcfdfe;">On 07/01/2024 all 3 jobs have been triggered in parallel.<br style="font-family: sans-serif !important;" />However, rsnapshot can run only once, and therefore 2 jobs have failed (rsnapshot creates a lockfile /var/run/rsnapshot.pid).</p>
<p style="color: #333333; font-size: 13px; font-family: sans-serif; background-color: #fcfdfe;">This means, one must ensure that these scheduled jobs run sequentially in this order:<br style="font-family: sans-serif !important;" />monthly - weekly - daily</p>
<p style="color: #333333; font-size: 13px; font-family: sans-serif; background-color: #fcfdfe;">Can you please advise how to modify the relevant systemd-timer config file to ensure the sequential job execution?</p>
<p style="color: #333333; font-size: 13px; font-family: sans-serif; background-color: #fcfdfe;">THX</p>

</body></html>