You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Backup fails with stale Restic lock when apply-updates runs during a backup #8077
Configure a scheduled backup (e.g. hourly) so that its start minute coincides with apply-updates.timer (default 03:12)
Wait for both timers to fire at the same time on a node where the backup of a large module (e.g. mail) is still running when the update starts
Observe the following backup runs for that module
Expected behavior
Module updates and backup runs do not interfere: either the update waits for the running backup to complete, or the backup is stopped gracefully so that Restic releases its repository lock. Subsequent backup runs succeed.
Actual behavior
The module update restarts the module's containers while backup1.service is mid-operation. The restic-<module>-<pid> container is killed with SIGTERM (backup1.service: Main process exited, code=killed, status=15/TERM) and Restic cannot release its lock. A stale lock file remains in the repository locks/ directory, and every subsequent backup run for that module fails during forget --prune with:
[ERROR] restic backup failed. Command '[...restic...] forget --prune --keep-last=360' returned non-zero exit status 11.
The failure chain persists until the lock is removed manually (restic unlock). Modules with short backup times are rarely affected; large modules (e.g. mail with ~400GB of data) are hit systematically.
Hi Piviul, thanks for the report — this hasn't been reported before.
The cause is a scheduling conflict: apply-updates.timer and your hourly backup both fire at minute :12, so the update restarts the module while Restic is running. The SIGTERM leaves a stale lock, and all subsequent runs fail until it's cleared.
Workarounds while we fix the job conflict:
change the backup schedule minute so it doesn't overlap with apply-updates.timer;
to recover, run restic unlock on the mail1 repository instead of deleting the lock file manually.
Please note this tracker follows specific bug report guidelines: for future issues use the community forum or, with a support plan, Nethesis support. We'll reformat the issue accordingly.
changed the title [-]mail1 backup fails periodically with restic: exit status 11 after container SIGTERM — orphaned lock file in locks/[/-][+]Backup fails with stale Restic lock when apply-updates runs during a backup[/+]on Jul 3, 2026
Expected: the journal shows A module backup is running: waiting for its completion..., the update proceeds only after the backup completes, and both the backup and the update succeed.
Remove the temporary dump script, and add a slow update script instead:
Run the update-module command again, and while the 05sleep script runs, start the backup. Expected: the backup output says dokuwiki1: already running, queued for retry, then dokuwiki1: backup <ID> completed (retry) after the update ends.
Activity
DavidePrincipi commentedon Jul 3, 2026
Hi Piviul, thanks for the report — this hasn't been reported before.
The cause is a scheduling conflict:
apply-updates.timerand your hourly backup both fire at minute :12, so the update restarts the module while Restic is running. The SIGTERM leaves a stale lock, and all subsequent runs fail until it's cleared.Workarounds while we fix the job conflict:
apply-updates.timer;restic unlockon the mail1 repository instead of deleting the lock file manually.Please note this tracker follows specific bug report guidelines: for future issues use the community forum or, with a support plan, Nethesis support. We'll reformat the issue accordingly.
[-]mail1 backup fails periodically with restic: exit status 11 after container SIGTERM — orphaned lock file in locks/[/-][+]Backup fails with stale Restic lock when apply-updates runs during a backup[/+]DavidePrincipi commentedon Nov 16, 2026
In Testing core 3.26.0-dev.3
Test case
Setup: install an app with update scripts, e.g.
dokuwiki1, and configure a backup for it. Below,<ID>is the backup ID.runagent -m node run-backup --backup=<ID>, and while it runs, update the app from another shell:A module backup is running: waiting for its completion..., the update proceeds only after the backup completes, and both the backup and the update succeed.update-modulecommand again, and while the05sleepscript runs, start the backup. Expected: the backup output saysdokuwiki1: already running, queued for retry, thendokuwiki1: backup <ID> completed (retry)after the update ends.runagent -m dokuwiki1 bash -c 'rm -f $AGENT_INSTALL_DIR/update-module.d/05sleep'DavidePrincipi commentedon Nov 16, 2026
VERIFIED