Commit Graph

688 Commits (prune-ignore-latest-common)

Author SHA1 Message Date
Axel Burri 358a2b1169 btrbk: cleanup: btrfs_send_to_file() takes no more additional options (all info is fetched directly from source/target config) 2017-03-18 15:06:48 +01:00
Axel Burri 28c65e4675 btrbk: add raw_target_split option, using "split" instead of "dd" to write raw files 2017-03-18 14:47:43 +01:00
Axel Burri 84e5b6243b documentation: cosmetics: fix typos 2017-03-18 12:19:07 +01:00
Axel Burri 690a8158ed ssh_filter_btrbk: always allow pipes through compression commands 2017-03-18 12:19:07 +01:00
Axel Burri da70158c24 ssh_filter_btrbk: correctly handle --sudo option 2017-03-18 12:19:07 +01:00
Axel Burri 3b7ede773a btrbk: bugfix: make sure rate limiting comes after compression in cmd_pipe 2017-03-18 12:18:47 +01:00
Axel Burri a7f52785bd documentation: add all accepted facility names for transaction_syslog 2017-02-18 13:16:43 +01:00
Axel Burri cb82bd5fa4 btrbk: add supoort for "backend btrfs-progs-sudo" option; adaptions in ssh_filter_btrbk.sh 2017-01-04 15:04:22 +01:00
Ian Kelling d02f67a924 btrbk: get_receive_targets: also match "src.received_uuid == target.uuid"
This gets important when using an old backup disk as source.

In terms of btrfs send/receive, all subvolumes matching "uuid /
received_uuid" are valid backups.

Merged (amend) from pull request: #116

Verified by Axel Burri <axel@tty0.ch>
2017-01-04 12:41:05 +01:00
Axel Burri 2acbe4978e documentation: cosmetics: fix spelling 2017-01-03 13:42:38 +01:00
Axel Burri 79637de5aa btrbk: raw_target_encrypt: always set "gpg --no-random-seed-file": prevents creation of "~/.gnupg/random_seed" with slight perfomance penalty.
We set "--no-random-seed-file" because one of the btrbk
design principles is to not create any files unasked. Enabling
"--no-random-seed-file" creates ~/.gnupg/random_seed, and as
such depends on $HOME to be set correctly (think on running in
cron). From gpg2(1) man page:
  --no-random-seed-file GnuPG uses a file to store its
  internal random pool over invocations This makes random
  generation faster; however sometimes write operations are not
  desired. This option can be used to achieve that with the cost
  of slower random generation.
2017-01-03 13:41:39 +01:00
Axel Burri b69e9ebf34 btrbk: show aggregate "size" and "used" for "usage" action 2016-12-11 15:36:48 +01:00
Axel Burri da849b37ae change version to 0.24.0 2016-11-16 15:32:17 +01:00
Axel Burri ff8815b235 Documentation: btrbk.conf.5: add link to https://github.com/digint/btrfs-progs-btrbk in description of "backend" feature 2016-11-16 15:31:16 +01:00
Axel Burri ec63e9932b btrbk: support for btrfs-progs v4.8.3
Fix parsing of "btrfs sub show" output, which has changed for toplevel
subvolume.
2016-11-16 15:02:49 +01:00
Matt Christian 8432e1b9be Makefile: Add -f option to all gzip commands
Always overwrite destination .gz files during make install.

Otherwise you need to manually answer y to several prompts.
```gzip: /usr/share/doc/btrbk/README.md.gz already exists; do you wish to overwrite (y or n)? y```
2016-11-16 14:10:50 +01:00
Axel Burri 57be688f6b btrbk: bugfix: fix "list latest" with no snapshots 2016-11-12 13:21:33 +01:00
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