borgmatic config generate --source deactivates vital option(s) #1337

Open
opened 2026-07-27 12:29:27 +00:00 by reibuehl · 1 comment

What I'm trying to do and why

I have upgraded from Debian 12 to Debian 13. After the upgrade I got warning messages from borgmatic about "Configuration sections (like location:, storage:, retention:, consistency:, and hooks:) are deprecated and support will be removed from a future release.". I tried to upgrade my configuration with the command borgmatic config generate --source config.yaml --destination config-new.yaml
When I run borgmatic with the new config, I get the error message "can not acquire a passphrase: BORG_PASSPHRASE is not set. BORG_PASSCOMMAND is not set. Interactive password query failed." and the whole backup fails.
Closer inspection of the two config files showed that in the old one encryption_passphrase is set but in the new one, encryption_passphrase is commented out.
Is this to be expected and if so, why?

Steps to reproduce

Process the attached sanitized config with borgmatic config generate --source oldconfig.yaml --destination newconfig.yaml

Actual behavior

The resulting newconfig.yaml contains the correct encryption_passphrase but it is commented out:
# encryption_passphrase: secret

Expected behavior

Used options stay active in the configuration unless they are not supported anymore. If they are not supported anymore, a warning message is displayed that directs to a migration documentation for the obsolete configuration line.

Other notes / implementation ideas

No response

borgmatic version

1.9.14

borgmatic installation method

Debian package

Borg version

borg 1.4.0

Python version

Python 3.13.5

Database version (if applicable)

No response

Operating system and version

PRETTY_NAME="Debian GNU/Linux 13 (trixie)" NAME="Debian GNU/Linux" VERSION_ID="13" VERSION="13 (trixie)" VERSION_CODENAME=trixie DEBIAN_VERSION_FULL=13.6 ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

### What I'm trying to do and why I have upgraded from Debian 12 to Debian 13. After the upgrade I got warning messages from borgmatic about "Configuration sections (like location:, storage:, retention:, consistency:, and hooks:) are deprecated and support will be removed from a future release.". I tried to upgrade my configuration with the command `borgmatic config generate --source config.yaml --destination config-new.yaml` When I run borgmatic with the new config, I get the error message "`can not acquire a passphrase: BORG_PASSPHRASE is not set. BORG_PASSCOMMAND is not set. Interactive password query failed.`" and the whole backup fails. Closer inspection of the two config files showed that in the old one encryption_passphrase is set but in the new one, encryption_passphrase is commented out. Is this to be expected and if so, why? ### Steps to reproduce Process the attached sanitized config with `borgmatic config generate --source oldconfig.yaml --destination newconfig.yaml` ### Actual behavior The resulting newconfig.yaml contains the correct encryption_passphrase but it is commented out: `# encryption_passphrase: secret ` ### Expected behavior Used options stay active in the configuration unless they are not supported anymore. If they are not supported anymore, a warning message is displayed that directs to a migration documentation for the obsolete configuration line. ### Other notes / implementation ideas _No response_ ### borgmatic version 1.9.14 ### borgmatic installation method Debian package ### Borg version borg 1.4.0 ### Python version Python 3.13.5 ### Database version (if applicable) _No response_ ### Operating system and version PRETTY_NAME="Debian GNU/Linux 13 (trixie)" NAME="Debian GNU/Linux" VERSION_ID="13" VERSION="13 (trixie)" VERSION_CODENAME=trixie DEBIAN_VERSION_FULL=13.6 ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"
Owner

That's a reasonable expectation, IMO! It looks like this a bug in old versions of borgmatic that has since been fixed. Apparently it was fixed in 2.0.0, so I recommend upgrading to at least that version. Or better yet, upgrade to a modern release like 2.1.7 if you can.

I realize that Debian stable includes pretty ancient versions of borgmatic (1.9.14 is almost 1.5 years old!), but maybe you can pull borgmatic from Debian testing or use one of the other installation methods.

Hope that helps!

That's a reasonable expectation, IMO! It looks like this a bug in old versions of borgmatic that has since been fixed. Apparently it was fixed in 2.0.0, so I recommend upgrading to at least that version. Or better yet, upgrade to a modern release like 2.1.7 if you can. I realize that Debian stable includes pretty ancient versions of borgmatic (1.9.14 is almost 1.5 years old!), but maybe you can pull borgmatic from Debian testing or use one of the [other installation methods](https://torsion.org/borgmatic/how-to/install-borgmatic/). Hope that helps!
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
borgmatic-collective/borgmatic#1337
No description provided.