diff --git a/@xen-orchestra/backups/writers/_MixinBackupWriter.js b/@xen-orchestra/backups/writers/_MixinBackupWriter.js index 609212eee4c..e94cdf75906 100644 --- a/@xen-orchestra/backups/writers/_MixinBackupWriter.js +++ b/@xen-orchestra/backups/writers/_MixinBackupWriter.js @@ -43,7 +43,13 @@ exports.MixinBackupWriter = (BaseClass = Object) => // merge worker only compatible with local remotes const { handler } = this._adapter if (merge && !disableMergeWorker && typeof handler._getRealPath === 'function') { - await handler.outputFile(join(MergeWorker.CLEAN_VM_QUEUE, formatFilenameDate(new Date())), this._backup.vm.uuid) + const taskFile = + join(MergeWorker.CLEAN_VM_QUEUE, formatFilenameDate(new Date())) + + '-' + + // add a random suffix to avoid collision in case multiple tasks are created at the same second + Math.random().toString(36).slice(2) + + await handler.outputFile(taskFile, this._backup.vm.uuid) const remotePath = handler._getRealPath() await MergeWorker.run(remotePath) } diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 4e264144583..f626d5637cf 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -15,6 +15,7 @@ - [Tables/actions] Fix collapsed actions being clickable despite being disabled (PRĀ [#6023](https://github.com/vatesfr/xen-orchestra/pull/6023)) - [Backup] Fix `handler.rmTree` is not a function (Forum [5256](https://xcp-ng.org/forum/topic/5256/s3-backup-try-it/29) PR [#6041](https://github.com/vatesfr/xen-orchestra/pull/6041) ) +- [Backup] Fix `EEXIST` in logs when multiple merge tasks are created at the same time ([Forum #5301](https://xcp-ng.org/forum/topic/5301/warnings-errors-in-journalctl)) ### Packages to release