Disabling Checks is broken: {'name': 'disabled'} is not of type 'string' #639

Closed
opened 2023-02-12 12:29:50 +00:00 by Schroedingers-Cat · 3 comments

What I'm trying to do and why

I'm trying to disable health checks on my backup client because the storage is a read-only remote handling consistency checks on its own terms and can perform these checks faster.

Steps to reproduce (if a bug)

According to the docs, disabling consistency checks works like this:

consistency:
    checks:
        - name: disabled

So all I do is adding these lines to a working config under /root/.config/borgmatic.d/profile-name.yaml.

This is how the complete file looks like:

---
location:
  source_directories:
    - /path/to/source/directory
  repositories:
    - username@remotehost:/path/To-Remote-Backup/archive.borg
  one_file_system: true
storage:
  archive_name_format: "{hostname}-Profile-Name-{now}"
retention:
    prefix: "{hostname}"
consistency:
    checks:
        - name: disabled

After that, just run a simple borgmatic list --verbosity 2.

Actual behavior (if a bug)

This is what I'm getting:

Ensuring legacy configuration is upgraded
/etc/borgmatic/config.yaml /etc/borgmatic.d /root/.config/borgmatic/config.yaml /root/.config/borgmatic.d: No valid configuration files found

summary:
/root/.config/borgmatic.d/profile-name.yaml: Error parsing configuration file
An error occurred while parsing a configuration file at /root/.config/borgmatic.d/profile-name.yaml:
At 'consistency.checks[0]': {'name': 'disabled'} is not of type 'string'
At 'consistency.checks[0]': {'name': 'disabled'} is not one of ['repository', 'archives', 'data', 'extract', 'disabled']
/etc/borgmatic/config.yaml /etc/borgmatic.d /root/.config/borgmatic/config.yaml /root/.config/borgmatic.d: No valid configuration files found

Need some help? https://torsion.org/borgmatic/#issues

Expected behavior (if a bug)

The expected behavior would be that the example from the documentation worked.

Other notes / implementation ideas

I tried some variants of the given config above because of the type not being 'string' like - name: 'disabled', - name: "disabled" or - name: repository but none of them changed the error message.

Environment

borgmatic version: 1.5.20

borgmatic installation method: Ubuntu/apt

Borg version: borg 1.2.3

Python version: Python 3.10.6

operating system and version: Ubuntu Server 22.04

#### What I'm trying to do and why I'm trying to disable health checks on my backup client because the storage is a read-only remote handling consistency checks on its own terms and can perform these checks faster. #### Steps to reproduce (if a bug) According to the [docs](https://torsion.org/borgmatic/docs/how-to/deal-with-very-large-backups/#disabling-checks), disabling consistency checks works like this: ```yaml consistency: checks: - name: disabled ``` So all I do is adding these lines to a working config under `/root/.config/borgmatic.d/profile-name.yaml`. This is how the complete file looks like: ```yaml --- location: source_directories: - /path/to/source/directory repositories: - username@remotehost:/path/To-Remote-Backup/archive.borg one_file_system: true storage: archive_name_format: "{hostname}-Profile-Name-{now}" retention: prefix: "{hostname}" consistency: checks: - name: disabled ``` After that, just run a simple `borgmatic list --verbosity 2`. #### Actual behavior (if a bug) This is what I'm getting: ``` Ensuring legacy configuration is upgraded /etc/borgmatic/config.yaml /etc/borgmatic.d /root/.config/borgmatic/config.yaml /root/.config/borgmatic.d: No valid configuration files found summary: /root/.config/borgmatic.d/profile-name.yaml: Error parsing configuration file An error occurred while parsing a configuration file at /root/.config/borgmatic.d/profile-name.yaml: At 'consistency.checks[0]': {'name': 'disabled'} is not of type 'string' At 'consistency.checks[0]': {'name': 'disabled'} is not one of ['repository', 'archives', 'data', 'extract', 'disabled'] /etc/borgmatic/config.yaml /etc/borgmatic.d /root/.config/borgmatic/config.yaml /root/.config/borgmatic.d: No valid configuration files found Need some help? https://torsion.org/borgmatic/#issues ``` #### Expected behavior (if a bug) The expected behavior would be that the example from the documentation worked. #### Other notes / implementation ideas I tried some variants of the given config above because of the type not being 'string' like `- name: 'disabled'`, `- name: "disabled"` or ``- name: repository`` but none of them changed the error message. #### Environment **borgmatic version:** 1.5.20 **borgmatic installation method:** Ubuntu/apt **Borg version:** borg 1.2.3 **Python version:** Python 3.10.6 **operating system and version:** Ubuntu Server 22.04
Schroedingers-Cat changed title from Disabling Checks is broken / {'name': 'disabled'} is not of type 'string' to Disabling Checks is broken: {'name': 'disabled'} is not of type 'string' 2023-02-12 12:31:22 +00:00
Owner

Looks like this is a version mismatch. To disable checks in the version of borgmatic you're using, try this:

consistency:
    checks:
        - disabled

Or better yet, upgrade borgmatic if possible. (The version you're using is almost a year and a half old.)

I'll clarify this detail in the documentation. Thanks for reporting it!

Looks like this is a version mismatch. To disable checks in the version of borgmatic you're using, try this: ``` consistency: checks: - disabled ``` Or better yet, upgrade borgmatic if possible. (The version you're using is almost a year and a half old.) I'll clarify this detail in the documentation. Thanks for reporting it!
witten added the
question / support
label 2023-02-13 05:31:42 +00:00

You're right. Using your example works just fine. Thanks a lot for your help!

Or better yet, upgrade borgmatic if possible. (The version you're using is almost a year and a half old.)

In case someone else wants to install the latest borgmatic version on Ubuntu Server 22.04 but wants to avoid using other package managers than apt, I've found this PPA: https://launchpad.net/~vincent-c/+archive/ubuntu/ppa/+packages

I just downloaded the current borgmatic deb file and installed it via dpkg on top of the existing one. Meaning, should my apt sources ever get a newer version for borgmatic, it'll be installed automatically.

You're right. Using your example works just fine. Thanks a lot for your help! > Or better yet, upgrade borgmatic if possible. (The version you're using is almost a year and a half old.) In case someone else wants to install the latest borgmatic version on Ubuntu Server 22.04 but wants to avoid using other package managers than apt, I've found this PPA: https://launchpad.net/~vincent-c/+archive/ubuntu/ppa/+packages I just downloaded the current borgmatic deb file and installed it via dpkg on top of the existing one. Meaning, should my apt sources ever get a newer version for borgmatic, it'll be installed automatically.
Owner

Awesome, glad to here you've got it working! The documentation has been updated as well.

Awesome, glad to here you've got it working! The documentation has been updated as well.
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#639
No description provided.