From 5cf2ef17324ec7ccf68a6a9c1616c127640677fe Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 30 Jun 2019 16:58:01 -0700 Subject: [PATCH] Add note to documentation about using spaces instead of tabs for indentation, as YAML does not allow tabs (#199). --- NEWS | 4 ++++ docs/how-to/set-up-backups.md | 19 ++++++++++++++++++- setup.py | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a925a2b7..73196113 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +1.3.13.dev0 + * #199: Add note to documentation about using spaces instead of tabs for indentation, as YAML does + not allow tabs. + 1.3.12 * Only log to syslog when run from a non-interactive console (e.g. a cron job). * Remove unicode byte order mark from syslog output so it doesn't show up as a literal in rsyslog diff --git a/docs/how-to/set-up-backups.md b/docs/how-to/set-up-backups.md index e170b8d7..466c7675 100644 --- a/docs/how-to/set-up-backups.md +++ b/docs/how-to/set-up-backups.md @@ -71,7 +71,8 @@ to ignore anything you don't need. Note that the configuration file is organized into distinct sections, each with a section name like `location:` or `storage:`. So take care that if you uncomment a particular option, also uncomment its containing section name, or -else borgmatic won't recognize the option. +else borgmatic won't recognize the option. Also be sure to use spaces rather +than tabs for indentation; YAML does not allow tabs. You can also get the same sample configuration file from the [configuration reference](https://torsion.org/borgmatic/docs/reference/configuration.md), the authoritative set of @@ -212,6 +213,22 @@ section of configuration. ## Troubleshooting +### "found character that cannot start any token" error + +If you run borgmatic and see an error looking something like this, it probably +means you've used tabs instead of spaces: + +```console +test.yaml: Error parsing configuration file +An error occurred while parsing a configuration file at test.yaml: +while scanning for the next token +found character that cannot start any token + in "test.yaml", line 230, column 1 +``` + +YAML does not allow tabs. So to fix this, simply replace any tabs in your +configuration file with the requisite number of spaces. + ### libyaml compilation errors borgmatic depends on a Python YAML library (ruamel.yaml) that will optionally diff --git a/setup.py b/setup.py index 394e8411..f4674131 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = '1.3.12' +VERSION = '1.3.13.dev0' setup(