Mirror Incremental Backup Error: Lock file already held
-
Hi,
I'm having an issue with mirroring incremental backups from TrueNAS over NFS to Backblaze S3. I have a normal incremental backup job that runs to backup to the TrueNAS first, and then after that the mirror incremental backups job runs. These are setup as a sequence.

The problem I'm facing is when the mirror job runs, I'm getting the following error: "Lock file is already being held". This always happens for the same VM every time. If I run the job manually afterwards, it is able to run successfully.
I'm currently running on this commit: https://github.com/vatesfr/xen-orchestra/commit/6ecabc3d9a1cc7daa1a94c87d997a97d0868343a
Here's the stacktrace from the log:
Error: Lock file is already being held at /opt/xo/xo-builds/xen-orchestra-202505291221/node_modules/proper-lockfile/lib/lockfile.js:68:47 at callback (/opt/xo/xo-builds/xen-orchestra-202505291221/node_modules/graceful-fs/polyfills.js:306:20) at FSReqCallback.oncomplete (node:fs:199:5) at FSReqCallback.callbackTrampoline (node:internal/async_hooks:130:17) From: at NfsHandler.addSyncStackTrace (/opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/fs/dist/local.js:21:26) at NfsHandler._lock (/opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/fs/dist/local.js:135:48) at NfsHandler.lock (/opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/fs/dist/abstract.js:237:27) at IncrementalRemoteVmBackupRunner.run (file:///opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/backups/_runners/_vmRunners/_AbstractRemote.mjs:136:40) at defer(run) (/opt/xo/xo-builds/xen-orchestra-202505291221/node_modules/golike-defer/dist/index.js:110:19) at file:///opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/backups/_runners/VmsRemote.mjs:116:53 at file:///opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/backups/Task.mjs:108:24 at Zone.run (/opt/xo/xo-builds/xen-orchestra-202505291221/node_modules/node-zone/index.js:80:23) at Task.run (file:///opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/backups/Task.mjs:106:23) at file:///opt/xo/xo-builds/xen-orchestra-202505291221/@xen-orchestra/backups/_runners/VmsRemote.mjs:114:20Thanks for the help.
-
Hi!
In the advanced backup options, please enable the "Merge backups synchronously" option.
-
@olivierlambert @ericp1337 especially enable this setting in the other jobs using this remote
-
Thanks @olivierlambert and @florent, that seems to have been the trick and fixed the issue.
-
O olivierlambert marked this topic as a question on
-
O olivierlambert has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login