Commit Graph

521 Commits (b6defaa37f48854d9323e4105a2b250cac4bbe84)

Author SHA1 Message Date
Axel Burri b6defaa37f documentation: add missing documentation of archive_preserve options 2016-08-29 19:44:17 +02:00
Axel Burri a8a311c8c7 btrbk: add "backend" configuration option: support for distinct binaries from btrfs-progs-btrbk
btrfs-progs-btrbk sources (fork of btrfs-progs) can be found at:

https://github.com/digint/btrfs-progs-btrbk
2016-08-29 18:40:42 +02:00
Axel Burri dc5dee3121 btrbk: use loglevel trace (instead of debug) for repeated WARN_ONCE 2016-08-29 15:03:56 +02:00
Axel Burri 1aa208151b btrbk: improve check_file(): sanitize only on demand 2016-08-29 15:03:20 +02:00
Axel Burri 4c4afe776d btrbk: skip target metadata test if send/receive has errors 2016-08-29 15:03:11 +02:00
Axel Burri 961f96833a btrbk: use "dd" for raw target output, with configurable block size (raw_target_block_size)
We use "dd" instead of shell redirections, as it is common to have
special filesystems (like NFS, SMB, FUSE) mounted on the raw target
path. By using "dd" we make sure to write in reasonably large blocks
(default=128K), which is not always the case when using redirections
(e.g. "gpg > outfile" writes in 8K blocks).

Another approach would be to always pipe through "cat", which uses
st_blksize from fstat(2) (with a minimum of 128K) to determine the
block size.
2016-08-25 13:14:01 +02:00
Axel Burri 3dabb507e6 btrbk: do not set "--compress-algo none" on gpg command if raw_target_compress=no
Note that gpg might still compress (according to OpenPGP standard) if
--compress-algo is not set. This is generally a good thing.
2016-08-25 12:53:12 +02:00
Axel Burri b0feaf4413 btrbk: force disabling of ssh compression (ssh -o compression=no) if stream_compress is set 2016-08-25 12:53:12 +02:00
Axel Burri b49ee61ecd btrbk: run_cmd: cosmetics 2016-08-25 12:53:12 +02:00
Axel Burri 5f530e47e5 btrbk: run_cmd: only perform sanity checks on files (hardcoded parts are considered safe) 2016-08-25 12:53:06 +02:00
Axel Burri 96f0d4c175 btrbk: fix and cleanup stream compression 2016-08-24 15:25:48 +02:00
Axel Burri 8f7d3e3c3d ssh_filter_btrbk: bugfix: use eval when running $SSH_ORIGINAL_COMMAND (does not faile with pipes) 2016-08-21 11:51:55 +02:00
Axel Burri 13d27c8616 btrbk: perform extra metadata check on target subvolume after "btrfs receive"
Eliminates error cases where "btrfs receive" input is null, at the
cost of an additional call to "btrfs subvolume show".
2016-08-19 17:41:03 +02:00
Axel Burri deeb12c069 ssh_filter_btrbk: allow stream compression if --compress option is set. 2016-08-19 17:36:40 +02:00
Axel Burri 9913e2785a documentation: add stream_compress documentation, update Changelog 2016-08-19 17:36:33 +02:00
Axel Burri 13887837b1 btrbk: add lz4 compression 2016-08-19 16:58:53 +02:00
Axel Burri 3845fa5ec5 btrbk: use format from %compression hash in $raw_postfix_match 2016-08-19 16:58:53 +02:00
Axel Burri 05c54a2390 btrbk: add compression options: pigz, pbzip2, lzo 2016-08-19 16:58:53 +02:00
Axel Burri a019d8a3e3 btrbk: add configuration option "stream_compress"
- add sophisticated stream compression in run_cmd
- add special "compress" cmd_pipe item
- add special "redirect" cmd_pipe item:
  use shell redirection instead of troublesome "dd of=".
- disable ssh_compression if stream_compression is set
2016-08-19 16:56:38 +02:00
Axel Burri 99ff88f82a btrbk: use (and propagate) CONFIG in vinfo instead of hard-setting RSH 2016-08-19 16:54:49 +02:00
Axel Burri 079b947cd6 btrbk: add function WARN_ONCE 2016-08-19 16:48:45 +02:00
TZdyrski edffbd4af9 ssh_filter_btrbk: update ssh_filter_btrbk.sh to use readlink
bugfix for: 796b6bd9bf

Replace realpath with readlink in allowed commands. Commit 796b6bd substituted readlink for realpath in file "btrbk"; this commit propagates the change to ssh_filter_btrbk.sh.
2016-08-19 01:05:02 +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
Tobias Grosser 84a5c56a83 btrbk: disable compression in gpg
We already perform compression before gpg, such that compressing in gpg
is just a waste of time. Interestingly, it seems gpg is not trying to
recompress gzip[ed] input streams, as for the default gzip compression
this patch does not change performance. However, it is necessary for
the upcoming lz4 compression to show its real benefit.
2016-08-07 13:40:45 +02:00
Axel Burri 66c36187ed documentation: README.md: remove link to digint-overlay, btrbk is in portage now 2016-07-14 14:19:09 +02:00
Axel Burri e9a72cf097 documentation: README.md: cosmetics 2016-07-14 14:19:08 +02:00
Axel Burri 9a5e8311be change version to 0.23.3 2016-07-14 01:41:45 +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 3f2e53ba71 Makefile: compress ChangeLog in install-doc 2016-07-13 20:56:19 +02:00
Craig Andrews 16d8fe36a1 Makefile: include ChangeLog in install-doc
install-doc should install ChangeLog along with the other documentation.
2016-07-13 19:09:05 +02:00
Axel Burri 796b6bd9bf btrbk: replace "realpath -e" with "readlink -e" for mountpoint discovery 2016-06-18 13:04:43 +02:00
Axel Burri 91d02ca97b change version to 0.23.2 2016-06-07 16:41:41 +02:00
Axel Burri 3a8665bce9 documentation: add information about wildcard characters for subvolume section; cleanup 2016-06-07 16:37:32 +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 6532229361 documentation: FAQ.md: recent versions of btrfs-progs print "is toplevel subvolume" instead of "is btrfs root" 2016-05-30 13:20:47 +02:00
Axel Burri 36edda5123 documentation: replace wrong "target_min" with "target_preserve_min" in example config 2016-05-30 13:19:07 +02:00
Axel Burri 7326b9816c btrbk: bugfix: raw targets: correctly handle multiple backups in same target directory 2016-05-09 12:42:04 +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
Benedikt Morbach df7473f7df Makefile: respect BINDIR in systemd service 2016-05-09 12:03:59 +02:00
Axel Burri cb0851c8b6 change version to 0.23.1 2016-05-03 16:21:34 +02:00
Axel Burri 65ebf949d1 documentation: cosmetics: groff: consistently use minus "\-" instead of hyphen "-" where applicable 2016-05-03 16:01:39 +02:00
Axel Burri cb6dcbe58e documentation: cosmetics (no more long lines) 2016-05-03 15:30:06 +02:00
Axel Burri 5cd03a8fbf btrbk: remove absolute path to executables, this caused trouble on some distros 2016-05-03 14:34:04 +02:00
Axel Burri 54b5368309 btrbk: code cleanup (remove unneeded code, rename vars) 2016-05-03 13:19:42 +02:00
Axel Burri 12d435d42a btrbk: explain "orphaned" status in "stats" command, and suppress it on "list backups" command 2016-04-30 13:01:12 +02:00
Axel Burri 46f1e5e2e4 btrbk: only load Data::Dumper if needed (log level "trace", or development version); cosmetics 2016-04-28 13:03:15 +02:00
Axel Burri 49ae46d51d btrbk: do not print headers to transaction_log, these are documented in btrbk.conf(5) 2016-04-28 12:51:00 +02:00
Axel Burri e9e398af37 Merge branch 'syslog' 2016-04-28 12:45:13 +02:00
Axel Burri 7a469597ac documentation: describe transaction log table format; cosmetics 2016-04-28 12:44:33 +02:00
Axel Burri 7e7c28f8f1 btrbk: add eval_quiet(), a simple wrapper around eval, disabling $SIG_(__DIE__) 2016-04-28 12:43:32 +02:00