update README.md

master
Bryan 2020-11-05 22:59:22 -06:00
parent 7ef6745ec5
commit a1e05a6d91
1 changed files with 24 additions and 9 deletions

View File

@ -1,14 +1,27 @@
# borgwrapper # borgwrapper
Wrapper to simplify backups with borgbackup Wrapper to simplify backups with borgbackup
# Installation
# Auto Installation
-----
Copy `config.example` to `config`
Edit `config with your settings`
Edit `systemd timer` files if you want to change backup timing
Run `./install` from borgwrapper directory
Follow instructions under Manual Installation to set up prerequisits for database dumps.
# Manual Installation
-----
Put the [script](src/borgwrapper) somewhere practical Put the [script](src/borgwrapper) somewhere practical
cp borgwrapper /usr/local/bin/borgwrapper cp borgwrapper /usr/local/bin/borgwrapper
chown root. /usr/local/bin/borgwrapper chown root. /usr/local/bin/borgwrapper
chmod 750 /usr/local/bin/borgwrapper chmod 750 /usr/local/bin/borgwrapper
# Configuration ## Configuration
By default borgwrapper expects the configuration to be located at `/etc/borgwrapper/config`. By default borgwrapper expects the configuration to be located at `/etc/borgwrapper/config`.
An example configuration file is included in [config.example](src/config.example). An example configuration file is included in [config.example](src/config.example).
Ensure restrictive permissions on this file as it exposes the passphrase. Ensure restrictive permissions on this file as it exposes the passphrase.
@ -37,8 +50,8 @@ Change permissions of `.my.conf`:
chmod 600 /root/.my.conf chmod 600 /root/.my.conf
# Scheduling ## Scheduling
## systemd ### systemd
Copy the example systemd [unit files](systemd/) to `/etc/systemd/system/`. Then for each Copy the example systemd [unit files](systemd/) to `/etc/systemd/system/`. Then for each
configuration file in `/etc/borgwrapper/<config_name>` do: configuration file in `/etc/borgwrapper/<config_name>` do:
@ -70,11 +83,6 @@ The output will land in
You can just drop files in the directory directly too, without editing via You can just drop files in the directory directly too, without editing via
systemctl. This is better suited for configuration management systems. systemctl. This is better suited for configuration management systems.
You can view the backup logs with:
journalctl -xu borgwrapper-backup@<config_name>
journalctl -xu borgwrapper-verify@<config_name>
If you want to run the tasks manually outside the timers you can just start them like usual If you want to run the tasks manually outside the timers you can just start them like usual
services: services:
@ -132,3 +140,10 @@ Examples:
(. /etc/borgwrapper/config; export BORG_PASSPHRASE; borg mount "$BORG_REPO" /mnt) (. /etc/borgwrapper/config; export BORG_PASSPHRASE; borg mount "$BORG_REPO" /mnt)
(. /etc/borgwrapper/config; export BORG_PASSPHRASE; borg list "$BORG_REPO") (. /etc/borgwrapper/config; export BORG_PASSPHRASE; borg list "$BORG_REPO")
# Miscellaneous
## Multiple config files
You may have multiple config files. Place all config files you want in `/etc/borgwrapper/config`
Run `./install` from borgwrapper directory and it will update systemd to include the new config files