Failed to execute script borgmatic-script #208

Closed
opened 2019-08-24 18:25:59 +00:00 by MKs2w7cBxTRP3e2ivnYBddxc · 6 comments

What I'm trying to do and why

Make a backup

Steps to reproduce (if a bug)

borgmatic --verbosity 1

Actual behavior (if a bug)

/media/backups/borg: Running consistency checks
Traceback (most recent call last):
  File "borgmatic-script.py", line 2, in <module>
  File "site-packages/borgmatic/commands/borgmatic.py", line 488, in main
  File "site-packages/borgmatic/commands/borgmatic.py", line 430, in collect_configuration_run_summary_logs
  File "site-packages/borgmatic/commands/borgmatic.py", line 289, in run_configuration
  File "site-packages/borgmatic/commands/borgmatic.py", line 352, in run_actions
  File "site-packages/borgmatic/borg/check.py", line 92, in check_archives
  File "site-packages/borgmatic/borg/check.py", line 35, in _parse_checks
TypeError: 'NoneType' object is not iterable
[18669] Failed to execute script borgmatic-script

borgmatic version: v1.3.5

borgmatic installation method: [e.g., Debian package, Docker container, etc.]
standlone binary from https://github.com/cmarquardt/borgmatic-binary

Borg version: 1.1.10

Python version: Python 2.7.13

operating system and version: debian 9 stretch

#### What I'm trying to do and why Make a backup #### Steps to reproduce (if a bug) borgmatic --verbosity 1 #### Actual behavior (if a bug) ``` /media/backups/borg: Running consistency checks Traceback (most recent call last): File "borgmatic-script.py", line 2, in <module> File "site-packages/borgmatic/commands/borgmatic.py", line 488, in main File "site-packages/borgmatic/commands/borgmatic.py", line 430, in collect_configuration_run_summary_logs File "site-packages/borgmatic/commands/borgmatic.py", line 289, in run_configuration File "site-packages/borgmatic/commands/borgmatic.py", line 352, in run_actions File "site-packages/borgmatic/borg/check.py", line 92, in check_archives File "site-packages/borgmatic/borg/check.py", line 35, in _parse_checks TypeError: 'NoneType' object is not iterable [18669] Failed to execute script borgmatic-script ``` **borgmatic version:** v1.3.5 **borgmatic installation method:** [e.g., Debian package, Docker container, etc.] standlone binary from https://github.com/cmarquardt/borgmatic-binary **Borg version:** 1.1.10 **Python version:** Python 2.7.13 **operating system and version:** debian 9 stretch
Owner

I appreciate you filing this. Any traceback is definitely a bug. Can you paste the consistency portion of your configuration file here? (Feel free to redact anything sensitive.) That'll help me nail down the problem. Thanks!

I appreciate you filing this. Any traceback is definitely a bug. Can you paste the `consistency` portion of your configuration file here? (Feel free to redact anything sensitive.) That'll help me nail down the problem. Thanks!
witten added the
bug
label 2019-08-24 20:16:13 +00:00

edit: looks like I had the checks line uncomented. I uncommented the lines for archive/repo and now there's no more errors. Thanks.

consistency:
    # List of one or more consistency checks to run: "repository", "archives", and/or
    # "extract". Defaults to "repository" and "archives". Set to "disabled" to disable
    # all consistency checks. "repository" checks the consistency of the repository,
    # "archive" checks all of the archives, and "extract" does an extraction dry-run
    # of the most recent archive.
    checks:
    #    - repository
    #    - archives
    #    - disabled
    # Paths to a subset of the repositories in the location section on which to run
    # consistency checks. Handy in case some of your repositories are very large, and
    # so running consistency checks on them would take too long. Defaults to running
    # consistency checks on all repositories configured in the location section.
    #check_repositories:
    #    - user@backupserver:sourcehostname.borg

    # Restrict the number of checked archives to the last n. Applies only to the "archives" check. Defaults to checking all archives.
    #check_last: 3

    # When performing the "archives" check, only consider archive names starting with
    # this prefix. Borg placeholders can be used. See the output of
    # "borg help placeholders" for details. Defaults to "{hostname}-".
    #prefix: sourcehostname
edit: looks like I had the checks line uncomented. I uncommented the lines for archive/repo and now there's no more errors. Thanks. ``` consistency: # List of one or more consistency checks to run: "repository", "archives", and/or # "extract". Defaults to "repository" and "archives". Set to "disabled" to disable # all consistency checks. "repository" checks the consistency of the repository, # "archive" checks all of the archives, and "extract" does an extraction dry-run # of the most recent archive. checks: # - repository # - archives # - disabled # Paths to a subset of the repositories in the location section on which to run # consistency checks. Handy in case some of your repositories are very large, and # so running consistency checks on them would take too long. Defaults to running # consistency checks on all repositories configured in the location section. #check_repositories: # - user@backupserver:sourcehostname.borg # Restrict the number of checked archives to the last n. Applies only to the "archives" check. Defaults to checking all archives. #check_last: 3 # When performing the "archives" check, only consider archive names starting with # this prefix. Borg placeholders can be used. See the output of # "borg help placeholders" for details. Defaults to "{hostname}-". #prefix: sourcehostname ```
Owner

Aha! So it looks like the value of checks: is empty in your configuration file, which evaluates to null/None, which is confusing borgmatic. I can certainly fix this in the next release. But if you'd like to work around the problem now with your current version, you can simply comment out the checks: line entirely.

Let me know if that works for you!

Aha! So it looks like the value of `checks:` is empty in your configuration file, which evaluates to null/None, which is confusing borgmatic. I can certainly fix this in the next release. But if you'd like to work around the problem now with your current version, you can simply comment out the `checks:` line entirely. Let me know if that works for you!
Owner

Glad that works for you! I'll leave this ticket open though until it's fixed in borgmatic itself.

Glad that works for you! I'll leave this ticket open though until it's fixed in borgmatic itself.
Owner

Okay, this is fixed in master now!

Okay, this is fixed in master now!
Owner

And now released as part of borgmatic 1.3.15!

And now released as part of borgmatic 1.3.15!
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#208
No description provided.