From 0cae581014263b989bc4a5f3fe9d3daef8c3f484 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 25 Jun 2025 09:27:38 -0700 Subject: [PATCH] Add fix for failing database hook creating archive to NEWS (#1032). --- NEWS | 1 + borgmatic/actions/create.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9bbacb2a..a144e2a2 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ 2.0.7.dev0 + * #1032: Fix a bug in which a Borg archive gets created even when a database hook fails. * #1083: Add "debug_passphrase"/"display_passphrase" options and a "{unixtime}" placeholder in support of Borg 2 features. * #1099: Clarify documentation on command hooks order of execution. diff --git a/borgmatic/actions/create.py b/borgmatic/actions/create.py index 7f342c92..b7b4bfb9 100644 --- a/borgmatic/actions/create.py +++ b/borgmatic/actions/create.py @@ -74,10 +74,10 @@ def run_create( ) stream_processes = [process for processes in active_dumps.values() for process in processes] - # If we have stream processes, we first create an archive with .checkpoint suffix. - # This is to make sure we only create a real archive if all the - # streaming processes completed successfully (create_archive will fail - # if a streaming process fails, but the archive might have already been created at this point). + # If we have stream processes, we first create an archive with .checkpoint suffix. This is + # to make sure we only create a real archive if all the streaming processes completed + # successfully (create_archive will fail if a streaming process fails, but the archive might + # have already been created at this point). use_checkpoint = bool(stream_processes) json_output = borgmatic.borg.create.create_archive(