From 4f0d3bf4edcb3a2cc9af5dfd5debc77d35cc9765 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Tue, 11 Jun 2019 17:03:40 -0700 Subject: [PATCH] Add docs/default about systemd journald rate limiting. --- docs/how-to/inspect-your-backups.md | 13 +++++++++++++ docs/how-to/set-up-backups.md | 4 ++-- sample/systemd/borgmatic.service | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/how-to/inspect-your-backups.md b/docs/how-to/inspect-your-backups.md index 956443c1..bafcf907 100644 --- a/docs/how-to/inspect-your-backups.md +++ b/docs/how-to/inspect-your-backups.md @@ -51,6 +51,19 @@ Or to increase syslog logging to include debug spew: borgmatic --syslog-verbosity 2 ``` +### systemd journal + +If your local syslog daemon is systemd's journal, be aware that journald by +default throttles the rate at which a particular program can log. So you may +need to [change the journald rate +limit](https://www.freedesktop.org/software/systemd/man/journald.conf.html#RateLimitIntervalSec=) +in `/etc/systemd/journald.conf` if you're finding that borgmatic journald logs +are missing. + +Note that the [sample borgmatic systemd service +file](https://torsion.org/borgmatic/docs/how-to/set-up-backups/#systemd) +already has this rate limit disabled. + ## Scripting borgmatic To consume the output of borgmatic in other software, you can include an diff --git a/docs/how-to/set-up-backups.md b/docs/how-to/set-up-backups.md index a23433dc..fd18b1c2 100644 --- a/docs/how-to/set-up-backups.md +++ b/docs/how-to/set-up-backups.md @@ -185,9 +185,9 @@ You can modify the cron file if you'd like to run borgmatic more or less frequen If you're using systemd instead of cron to run jobs, download the [sample systemd service -file](https://projects.torsion.org/witten/borgmatic/src/master/sample/systemd/borgmatic.service) +file](https://projects.torsion.org/witten/borgmatic/raw/branch/master/sample/systemd/borgmatic.service) and the [sample systemd timer -file](https://projects.torsion.org/witten/borgmatic/src/master/sample/systemd/borgmatic.timer). +file](https://projects.torsion.org/witten/borgmatic/raw/branch/master/sample/systemd/borgmatic.timer). Then, from the directory where you downloaded them: ```bash diff --git a/sample/systemd/borgmatic.service b/sample/systemd/borgmatic.service index 4b8a38d8..11e3b526 100644 --- a/sample/systemd/borgmatic.service +++ b/sample/systemd/borgmatic.service @@ -4,3 +4,4 @@ Description=borgmatic backup [Service] Type=oneshot ExecStart=/root/.local/bin/borgmatic +LogRateLimitIntervalSec=0