Borgmatic stopped working on 1/5 hosts. #992

Closed
opened 2025-02-07 13:10:42 +00:00 by tehNiemer · 2 comments

What I'm trying to do and why

Run borgmatic commands

Steps to reproduce

Run any command

source_directories:
    - /home
    - /etc
    - /root
    - /opt
    - /var/spool/cron
    - /var/log/syslog*

repositories:
    - path: ssh://root@vmnas01.home/srv/mergerfs/Data/Backup/BorgBackup/PHMSOS01
      label: openmediavault

exclude_patterns:
    - '/root/.config/borg/security/*/nonce'

exclude_caches: true

exclude_if_present:
    - .nobackup

encryption_passphrase: ""

retries: 3

retry_wait: 300

archive_name_format: '{hostname}-{now:%Y-%m-%dT%H:%M:%S}'

match_archives: sh:*

relocated_repo_access_is_ok: true

keep_daily: 30
keep_weekly: 0
keep_monthly: 0
keep_yearly: 0

checks:
    - name: archives
      frequency: 2 weeks
    - name: data
      frequency: 1 month

before_backup:
    - echo Starting a backup. $(date +"%T %Z")

before_prune:
    - echo Starting pruning. $(date +"%T %Z")

before_compact:
    - echo Starting compaction. $(date +"%T %Z")

before_check:
    - echo Starting checks. $(date +"%T %Z")
    
after_backup:
    - echo Finished a backup. $(date +"%T %Z")

after_compact:
    - echo Finished compaction. $(date +"%T %Z")

after_prune:
    - echo Finished pruning. $(date +"%T %Z")

after_check:
    - echo Finished checks. $(date +"%T %Z")

Actual behavior

root@phmsos01:~# borgmatic check
Traceback (most recent call last):
  File "/root/.local/bin/borgmatic", line 8, in <module>
    sys.exit(main())
  File "/root/.local/pipx/venvs/borgmatic/lib/python3.9/site-packages/borgmatic/commands/borgmatic.py", line 922, in main
    configure_logging(
  File "/root/.local/pipx/venvs/borgmatic/lib/python3.9/site-packages/borgmatic/logger.py", line 297, in configure_logging
    console_handler.setFormatter(Console_color_formatter())
  File "/root/.local/pipx/venvs/borgmatic/lib/python3.9/site-packages/borgmatic/logger.py", line 108, in __init__
    super(Console_color_formatter, self).__init__(
TypeError: __init__() got an unexpected keyword argument 'defaults'

Expected behavior

The check completes

Other notes / implementation ideas

This is recent behavior, a week or so ago this was working on this host and there have been no changes made to the configuration. I have similar if not identical instances running on a handful of other machines that are working fine.

borgmatic version

version 1.9.9 (location: /root/.local/pipx/venvs/borgmatic)

borgmatic installation method

pipx

Borg version

borg 1.2.3

Python version

Python 3.9.2

Database version (if applicable)

No response

Operating system and version

Debian GNU/Linux 11 (bullseye)

### What I'm trying to do and why Run borgmatic commands ### Steps to reproduce Run any command ``` source_directories: - /home - /etc - /root - /opt - /var/spool/cron - /var/log/syslog* repositories: - path: ssh://root@vmnas01.home/srv/mergerfs/Data/Backup/BorgBackup/PHMSOS01 label: openmediavault exclude_patterns: - '/root/.config/borg/security/*/nonce' exclude_caches: true exclude_if_present: - .nobackup encryption_passphrase: "" retries: 3 retry_wait: 300 archive_name_format: '{hostname}-{now:%Y-%m-%dT%H:%M:%S}' match_archives: sh:* relocated_repo_access_is_ok: true keep_daily: 30 keep_weekly: 0 keep_monthly: 0 keep_yearly: 0 checks: - name: archives frequency: 2 weeks - name: data frequency: 1 month before_backup: - echo Starting a backup. $(date +"%T %Z") before_prune: - echo Starting pruning. $(date +"%T %Z") before_compact: - echo Starting compaction. $(date +"%T %Z") before_check: - echo Starting checks. $(date +"%T %Z") after_backup: - echo Finished a backup. $(date +"%T %Z") after_compact: - echo Finished compaction. $(date +"%T %Z") after_prune: - echo Finished pruning. $(date +"%T %Z") after_check: - echo Finished checks. $(date +"%T %Z") ``` ### Actual behavior ``` root@phmsos01:~# borgmatic check Traceback (most recent call last): File "/root/.local/bin/borgmatic", line 8, in <module> sys.exit(main()) File "/root/.local/pipx/venvs/borgmatic/lib/python3.9/site-packages/borgmatic/commands/borgmatic.py", line 922, in main configure_logging( File "/root/.local/pipx/venvs/borgmatic/lib/python3.9/site-packages/borgmatic/logger.py", line 297, in configure_logging console_handler.setFormatter(Console_color_formatter()) File "/root/.local/pipx/venvs/borgmatic/lib/python3.9/site-packages/borgmatic/logger.py", line 108, in __init__ super(Console_color_formatter, self).__init__( TypeError: __init__() got an unexpected keyword argument 'defaults' ``` ### Expected behavior The check completes ### Other notes / implementation ideas This is recent behavior, a week or so ago this was working on this host and there have been no changes made to the configuration. I have similar if not identical instances running on a handful of other machines that are working fine. ### borgmatic version version 1.9.9 (location: /root/.local/pipx/venvs/borgmatic) ### borgmatic installation method pipx ### Borg version borg 1.2.3 ### Python version Python 3.9.2 ### Database version (if applicable) _No response_ ### Operating system and version Debian GNU/Linux 11 (bullseye)
Owner

Thanks for filing this! The issue has actually already been fixed in main (see #989) and will be part of the next release. Basically, borgmatic 1.9.9 accidentally broke compatibility with Python 3.9 by using a Python 3.10+ only language feature. That's why you're only seeing this problem on only one out of your five hosts—I'm guessing the others are running Python 3.10+.

Thanks for filing this! The issue has actually already been fixed in main (see #989) and will be part of the next release. Basically, borgmatic 1.9.9 accidentally broke compatibility with Python 3.9 by using a Python 3.10+ only language feature. That's why you're only seeing this problem on only one out of your five hosts—I'm guessing the others are running Python 3.10+.
Owner

Released in borgmatic 1.9.10!

Released in borgmatic 1.9.10!
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#992
No description provided.