XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Mirror Incremental Backup Error: Lock file already held

    Scheduled Pinned Locked Moved Solved Backup
    4 Posts 3 Posters 539 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      ericp1337
      last edited by

      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.

      Screenshot 2025-06-02 at 5.25.50 PM.png

      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:20
      

      Thanks for the help.

      0 MathieuRA committed to vatesfr/xen-orchestra
      feat: release 5.107.1 (#8656)
      1 Reply Last reply Reply Quote 0
      • olivierlambertO Online
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by olivierlambert

        Hi!

        In the advanced backup options, please enable the "Merge backups synchronously" option.

        florentF 1 Reply Last reply Reply Quote 0
        • florentF Offline
          florent Vates 🪐 XO Team @olivierlambert
          last edited by

          @olivierlambert @ericp1337 especially enable this setting in the other jobs using this remote

          1 Reply Last reply Reply Quote 0
          • E Offline
            ericp1337
            last edited by

            Thanks @olivierlambert and @florent, that seems to have been the trick and fixed the issue.

            1 Reply Last reply Reply Quote 2
            • olivierlambertO olivierlambert marked this topic as a question on
            • olivierlambertO 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
            • First post
              Last post