Commit Graph

19 Commits (lsbtr-related)

Author SHA1 Message Date
Axel Burri c2308a52a6 btrbk-mail: add more elaborated email and rsync options
- If rsync is enabled, show number of created/deleted/transferred
  files in mail subject.
- Add options to show summary and/or detail message in mail body.
- Add option to skip btrbk if no files were transferred via rsync.
- Add option to call sync(1) prior to running btrbk.
- Add option to skip btrbk execution if no files were transferred.
2020-08-29 12:31:18 +02:00
Asbjørn Apeland 2d7f5ec5fe contrib: systemd: btrbk.timer: change install target
Using `WantedBy=multi-user.target` makes boot wait for btrbk.service
before it's considered "finished". This can be checked by running
`systemd-analyze` or checking the system log using `journalctl`.

Timers should use the "timers.target" target, see systemd.special(7).
2019-10-27 12:24:00 +01:00
Axel Burri 805d7f4a0d btrbk-verify: add workaround for btrbk <= 0.27.2 bug: missing target_rsh, target_type
btrbk <= 0.27.2 does not print "target_rsh" and "target_type" when
called with --format=raw, see $table_formats{resolved}. This is fixed
in 0.28.0.

Hardcoding target_type=send-receive is not so bad, as for raw targets
btrbk-verify complains first with:

  btrbk-verify: missing required variable "target_rsh" in btrbk --format=raw line

So we should not run rsync (which is not really a problem, rsync just
fails with "not a directory").
2019-04-01 16:27:49 +02:00
Axel Burri 9ed41c8937 btrbk-verify: tool for automated backup integrity check based on rsync
Compare files and attributes by checksum, using rsync(1) in dry-run
mode with all preserve options enabled.

Resolves snapshot/backup pairs by evaluating the output of
"btrbk list latest [filter...]".

Restrictions:
 - ".d..t...... ./" lines are ignored by default:
   Root folder timestamp always differ.
 - "cd+++++++++ .*" lines are ignored by default:
   Nested subvolumes appear as new empty directories.
 - btrbk raw targets are skipped
 - rsync needs root in most cases (see --ssh-* options)
2019-04-01 16:27:45 +02:00
Axel Burri b8e88f71a6 contrib: systemd: btrbk.service: add Documentation link to btrbk(1) 2017-10-24 13:29:06 +02:00
Axel Burri 79cbf7c0c3 change version to 0.26.0 2017-10-12 00:39:06 +02:00
Axel Burri d941ecfce9 documentation: change digint links to https:// 2017-10-11 20:54:41 +02:00
Axel Burri 422d52c063 btrbk: add key derivation for encrypted raw targets using external backend 2017-09-28 14:17:00 +02:00
Axel Burri dcb0c5aa28 contrib/migration/raw_suffix2sidecar: add migration tool for creating raw sidecar files from uuid-suffixed raw backup files 2017-09-28 14:17:00 +02:00
Axel Burri 708444b096 btrbk-mail, README.md: suggest using "rsync --inplace"
When used without --inplace, rsync creates a new copy of the file and
moves it into place when it is complete, having the effect that btrfs
creates a new extent for the WHOLE file. With --inplace however, rsync
writes the updated data directly to the destination file, having the
effect that btrfs creates a new extent only for the differing part of
the file.
2016-08-17 14:49:27 +02:00
Asbjørn Apeland 16d73b4e5a Makefile: support .in files (use to replace @BINDIR@ in btrbk.service) 2016-07-13 20:56:28 +02:00
Axel Burri e4a7ba4be5 btrbk: add lockfile support, using perl "flock": add configuration option "lockfile <file>", and command line option "--lockfile"' 2016-06-07 16:17:02 +02:00
Axel Burri eabdba482e btrbk-mail: Use relative instead of absolute calls to system binaries
Make sure to have apropriate PATH set when calling btrbk-mail.
Usually specified in /etc/crontab, and should be correct by default on
all distros.
2016-05-09 12:13:22 +02:00
Moritz Ulrich d47cc25f60 btrbk-mail: bugfix: use `btrbk` instead of unbound variable `$btrbk` 2016-03-21 18:52:53 +01:00
Axel Burri 5c8d3f94f3 contrib: cron: btrbk-mail: append rsync stats to mail body 2015-10-25 12:20:59 +01:00
Axel Burri cb1b4d146d contrib: cron: btrbk-mail: add rsync and mount/umount functionality 2015-10-25 12:20:59 +01:00
Axel Burri 4925f3ac7d contrib: cron: btrbk-mail: wrapper script sending email with btrbk results and exit codes 2015-10-25 12:20:59 +01:00
Axel Burri 898f7ef0f6 contrib: systemd: fixed path in btrbk service unit 2015-05-21 15:52:50 +02:00
Axel Burri 09e214acf4 contrib: systemd: added systemd service and timer units (for daily backup) 2015-05-20 16:42:12 +02:00