/etc/borgmatic/config.yaml: Configuration sections (like location: and storage:) are deprecated #744

Closed
opened 2023-08-15 20:59:58 +00:00 by phamhung77 · 5 comments

What I'm trying to do and why

Running backup with Borgmatic 1.8. The config is 1.7 format, and I am trying to convert to 1.8 format

Steps to reproduce

Updating the config.yaml format

  1. Old format:
    location:
    source_directories:

    • /home
  2. New format:
    source_directories:

    • /home

Actual behavior

/etc/borgmatic/config.yaml: Error parsing configuration file
An error occurred while parsing a configuration file at /etc/borgmatic/config.yaml:
while parsing a block mapping
in "", line 12, column 1

/*** line 12, column 1 is the new "source_directories:" line ***/

Expected behavior

No response

Other notes / implementation ideas

No response

borgmatic version

1.8.0

borgmatic installation method

DNF on CloudLinux 9

Borg version

1.2.4

Python version

3.9.16

Database version (if applicable)

No response

Operating system and version

CloudLinux 9.2

### What I'm trying to do and why Running backup with Borgmatic 1.8. The config is 1.7 format, and I am trying to convert to 1.8 format ### Steps to reproduce Updating the config.yaml format 1. Old format: location: source_directories: - /home 2. New format: source_directories: - /home ### Actual behavior /etc/borgmatic/config.yaml: Error parsing configuration file An error occurred while parsing a configuration file at /etc/borgmatic/config.yaml: while parsing a block mapping in "<unicode string>", line 12, column 1 _/*** line 12, column 1 is the new "source_directories:" line ***/_ ### Expected behavior _No response_ ### Other notes / implementation ideas _No response_ ### borgmatic version 1.8.0 ### borgmatic installation method DNF on CloudLinux 9 ### Borg version 1.2.4 ### Python version 3.9.16 ### Database version (if applicable) _No response_ ### Operating system and version CloudLinux 9.2
Owner

I'm not sure exactly what's going on with parsing your configuration file, but I imagine there's some problem with its formatting. Would you be able to attach your exact configuration file (with any sensitive information redacted) so that I can take a look at it and try to reproduce the problem locally? Alternatively, you can link to your config on a gist or pastebin service if you'd prefer. Thank you!

I'm not sure exactly what's going on with parsing your configuration file, but I imagine there's some problem with its formatting. Would you be able to attach your exact configuration file (with any sensitive information redacted) so that I can take a look at it and try to reproduce the problem locally? Alternatively, you can link to your config on a gist or pastebin service if you'd prefer. Thank you!
witten added the
question / support
label 2023-08-15 21:55:18 +00:00
Author

I attached the config file. The errors are:

borgmatic --verbosity 2

/etc/borgmatic/config.yaml /etc/borgmatic.d /root/.config/borgmatic/config.yaml /root/.config/borgmatic.d: No valid configuration files found

summary:
/etc/borgmatic/config.yaml: Loading configuration file
/etc/borgmatic/config.yaml: Error parsing configuration file
An error occurred while parsing a configuration file at /etc/borgmatic/config.yaml:
while parsing a block mapping
in "", line 1, column 1
did not find expected key
in "", line 11, column 2
/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

I attached the config file. The errors are: # borgmatic --verbosity 2 /etc/borgmatic/config.yaml /etc/borgmatic.d /root/.config/borgmatic/config.yaml /root/.config/borgmatic.d: No valid configuration files found summary: /etc/borgmatic/config.yaml: Loading configuration file /etc/borgmatic/config.yaml: Error parsing configuration file An error occurred while parsing a configuration file at /etc/borgmatic/config.yaml: while parsing a block mapping in "<unicode string>", line 1, column 1 did not find expected key in "<unicode string>", line 11, column 2 /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
Owner

The error message you're getting sure isn't helping, but I think the problem is that some of your options are not fully left-aligned in your configuration file. In other words, options like one_file_system and exclude_caches (and all the following options) have extra spaces before them that should be removed. Once you remove those spaces and the options are properly lined up, I'm pretty sure your configuration file will work! Let me know if that does it for you.

The error message you're getting sure isn't helping, but I think the problem is that some of your options are not fully left-aligned in your configuration file. In other words, options like `one_file_system` and `exclude_caches` (and all the following options) have extra spaces before them that should be removed. Once you remove those spaces and the options are properly lined up, I'm pretty sure your configuration file will work! Let me know if that does it for you.
Author

Thank you. It works when I deleted all spaces before each line.

Thank you. It works when I deleted all spaces before each line.
Owner

Awesome, glad to hear it! Feel free to file another ticket if you encounter any other problems.

Awesome, glad to hear it! Feel free to file another ticket if you encounter any other problems.
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#744
No description provided.