Commit Graph

560 Commits (ee17c1a2b4945f6ef31c295a5ef63a13b60a094e)

Author SHA1 Message Date
Axel Burri ee17c1a2b4 ssh_filter_btrbk: accept mbuffer command (stream_compress) 2017-08-21 14:39:40 +02:00
Axel Burri 5428e9cd93 btrbk: add "resume" and "snapshot" commands; add --preserve-snapshots and --preserve-backups options; deprecate "-r, --resume-only" command line option 2017-08-21 13:23:20 +02:00
Axel Burri a9f1b6b24a change version to 0.25.1 2017-07-30 16:03:58 +02:00
Axel Burri 6cf5d59644 btrbk: add support for btrfs-progs 4.12: do not fail or set realpath_cache for relative paths in btrfs_subvolume_show()
As of btrfs-progs-v4.12, the "btrfs subvolume show" command does not
print the full (absolute, resolved) path anymore [1]. Instead, it prints
the relative path to btrfs root (or "/" if it is the root).

The impact for btrbk is that we cannot fill our realpath_cache in
btrfs_subvolume_show() anymore. This is not fatal, but has the
following consequences:

  - The "check for duplicate snapshot locations" may now miss
    subvolumes specified by symlinks.

  - If multiple "volume" sections point to the same subvolume (e.g. if
    specified using symlinks) an additional "btrfs subvolume list" is
    called. Note that the subvolume will still be recognized as
    identical, and the btr_tree will not be rebuilt.

  [1] btrfs-progs commit: b7df24aa5cddc4802b9938f56372b73869775cd9
2017-07-30 15:25:32 +02:00
Axel Burri 26682213e2 btrbk: cleanup btrfs_subvolume_list() and comments 2017-07-30 15:03:23 +02:00
Axel Burri 7b50846957 documentation: add more instructions for faulty received_uuid 2017-07-29 20:54:43 +02:00
Axel Burri 356231bc2a btrbk: abort if source subvolume has readonly or received_uuid flag 2017-07-29 19:03:23 +02:00
Michael Goodwin 59cc728d90 documentation: README.md: add fedora instructions and pv prereq 2017-07-21 14:00:49 +02:00
Axel Burri b891617086 documentation: add donate section (paypal) in README.md 2017-07-13 12:54:08 +02:00
Michael Goodwin c5ea0c5c71 Makefile: Preserve timestamps with install -p 2017-07-05 14:02:44 -04:00
Axel Burri 83a38cb390 documentation: FAQ.md: add section "How can I setup a debian pre-install-hook?" 2017-06-25 21:23:55 +02:00
Axel Burri c0c546eb4e btrbk: stats command: show "correlated" status instead of "orphaned" (inverse logic which caused a lot of confusion) 2017-06-25 21:16:08 +02:00
Axel Burri 15bae5e051 btrbk: stats command: print up-to-date status on backups 2017-06-25 21:14:03 +02:00
Axel Burri b2cc99b0fb btrbk: bugfix: accept "no" for "transaction_log", "transaction_syslog" and "lockfile" configuration options 2017-06-25 18:06:06 +02:00
Axel Burri 315b3f24a1 btrbk: add config option "stream_buffer <size>". if set, pipes send stream through "mbuffer -m <size>" 2017-06-08 12:35:22 +02:00
Axel Burri 401b4ac45c documentation: README.md: add warning about using `btrfs property set` when restoring backups 2017-05-08 14:28:17 +02:00
Cerem Cem ASLAN ed80bccc79 documentation: README.md: minor fixes in example 2017-04-29 21:37:39 +02:00
Cerem Cem ASLAN b58817d5af documentation: FAQ.md: improved "changing root subvolume" section
Fixed the default subvolume ID from 0 to 5. Added some tips.
2017-04-29 21:06:18 +02:00
Santiago Castro b4ec8d32a5 Fix broken Markdown headings 2017-04-17 22:52:07 -03:00
Bladtman242 4f05bb78f0 Update README.md
Under "Example: laptop with usb-disk for backups" the readme stated that " snapshot_preserve 14d" will "keep daily snapshots for 14 days [..]". I believe that this is misleading, as it seems to imply that only one snapshot --the latest -- will be kept in that period, when in fact _all_ snapshots will be kept in that period.
2017-03-30 22:34:48 +02:00
Axel Burri 7436d9432c change version to 0.25.0 2017-03-18 16:53:07 +01:00
Axel Burri d31ffb8cb0 btrbk: allow trailing comments in btrbk.conf 2017-03-18 16:34:53 +01:00
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