Commit Graph

824 Commits (c9fb366d09c4923e408a2a14b9881039ea0f4e04)

Author SHA1 Message Date
Axel Burri e3a81c8126 btrbk: do not print help message if -q,--quiet is set
When called from another script, we dont want the help message printed
on errors. E.g. when running something like:

    btrbk list snapshots -q filter_which_does_not_match
2019-04-01 15:31:58 +02:00
Axel Burri 6d465da6dc btrbk: change version to 0.28.0-dev; bump copyright year 2019-03-29 04:35:35 +01:00
Axel Burri bb2e9877b0 change version to 0.27.2 2019-03-26 15:08:55 +01:00
Axel Burri dfabd4e856 documentation: btrbk.conf.5: move info about allowed characters to top section 2019-03-26 15:08:55 +01:00
Axel Burri 4a23568c40 documentation: btrbk.conf.5: remove unnecessary "{zwsp}" (zero width space) 2019-03-26 15:08:55 +01:00
Axel Burri 86a930daf1 Makefile: add option to bypass compression (COMPRESS=no)
While on traditional UNIX the documentation (especially the man pages)
are gzip'ed, modern distros have helpers to compress it.

This patch adds an option to disable compression:

    make COMPRESS=no
2019-03-26 15:08:47 +01:00
Axel Burri a412908451 Makefile: add documentation on "all" build target 2019-03-25 14:41:55 +01:00
Axel Burri 0e63843195 doc/Makefile: prefer asciidoctor (fallback to asciidoc) for man page generation
Changed preference for man page generation, as "asciidoc" is
discontinued and relies on python-2.7.
2019-03-25 14:37:35 +01:00
Axel Burri 6f68b713ee btrbk: fix scheduler when overriding "target_preserve_min" in combination with global "target" section
When configuring "target" in a global (or "volume") context, and
overriding target_preserve_min in "subvolume" section, the scheduler
has undefined behavior (mixing up the "min" values).

Fixed by returning a copy of the preserve hash in
config_preserve_hash().
2019-03-04 16:05:38 +01:00
Axel Burri 17957a163a btrbk: trigger autofs mount while resolving mountpoints
If resolved mount point has fs_type=autofs, trigger automount by
calling "btrfs subvolume show" on the mount point, and check mountinfo
again.
2019-01-17 16:43:42 +01:00
Axel Burri f37a638f30 btrbk: bump version to 0.27.2-dev 2019-01-17 16:43:39 +01:00
Axel Burri 8abaed26c5 documentation: README.md: bump dependency >= btrfs-progs-4.12 (as of btrbk-0.27.0)
dependency introduced in:

0acbf74c btrbk: add btrfs_subvolume_list_complete: fetch all subvolumes with all flags
2019-01-04 15:49:10 +01:00
Axel Burri bd66f83663 btrbk: bump to forgotten dependency >= btrfs-progs-4.12 (as of btrbk-0.27.0)
dependency introduced in:

0acbf74c btrbk: add btrfs_subvolume_list_complete: fetch all subvolumes with all flags
2018-12-25 22:20:24 +01:00
Axel Burri e879620195 change version to 0.27.1 2018-12-05 22:18:19 +01:00
Axel Burri e52153e13c ChangeLog: add missing changelog for v0.27.1 2018-12-05 22:17:27 +01:00
Axel Burri 0e6c1f9025 btrbk: fix regression: call "sudo readlink" for backend=btrfs-progs-sudo
It is possible that the subvolume path is not accessible by the user
calling btrbk. When resolving mount points, "readlink" is used on the
path, which also needs to be wrapped with "sudo".
2018-12-05 22:01:07 +01:00
Axel Burri ff011d55af btrbk: fix "config print" command (undefined value in format_preserve_matrix())
regression: 5791d72171 btrbk: add "preserve_hour_of_day" configuration option
2018-12-05 21:43:54 +01:00
Axel Burri de851955b6 btrbk: print_formatted: no blank lines for format: raw,tlog,syslog 2018-10-31 14:33:07 +01:00
Axel Burri ebaaee2139 btrbk: print_formatted: omit title for format: raw,tlog,syslog 2018-10-31 14:06:14 +01:00
Axel Burri 74873081c3 btrbk: bump version to 0.27.1-dev 2018-10-31 13:57:06 +01:00
Axel Burri c59488f405 change version to 0.27.0 2018-10-16 12:19:44 +02:00
Axel Burri 97e4a1e5d3 ChangeLog: add migration documentation regarding scheduler bugfix 2018-10-16 12:04:19 +02:00
Axel Burri 56ee8acf3b btrbk: add "-S" command line option (shortcut for --print-schedule) 2018-10-15 16:25:07 +02:00
Axel Burri 7a8df85f2e btrbk: fix regression: add node to return value of vinfo_resolved()
The FORCE_PRESERVE information is set on the node, and was lost for
"latest common target" as get_receive_targets() returned vinfo without
node information.

fixes regression: 6c502cb btrbk: search complete target tree for correlated subvolumes
2018-10-15 16:19:52 +02:00
Axel Burri 49adbe6e28 documentation: README.md: explain send/receive using parent when restoring backups 2018-10-13 14:24:26 +02:00
Axel Burri 5c434bc197 documentation: cosmetics: delete trainling whitespace 2018-10-13 13:44:04 +02:00
Axel Burri ad20b9a360 documentation: btrbk.1: explain root privileges and snapshot/backup terminology 2018-10-13 13:29:14 +02:00
Axel Burri 37def3dc7e documentation: btrbk.conf.5: adaptions for backend and ssh_user option (cosmetics) 2018-10-13 13:29:14 +02:00
Axel Burri f554a36978 documentation: adaptions for asciidoctor (literal blocks) 2018-10-13 13:29:14 +02:00
Axel Burri d324f0d338 documentation: README.md: remove "upgrading from v0.22.2" section
This is more than two years old, everybody should have newer btrbk
release by now.

Note: "doc/upgrade_to_v0.23.0.md" is still available.
2018-10-13 13:29:14 +02:00
Axel Burri c2a344fed1 documentation: move installation instructions from README.md to doc/install.md 2018-10-13 13:29:08 +02:00
Axel Burri 756e1e9449 documentation: remove broken link to gmane (received_uuid patch in kernel 4.4)
gmane is dead, see kernel patch:

b96b1db039 btrfs: fix resending received snapshot with parent
2018-10-11 16:03:31 +02:00
Axel Burri 0a4fb02eeb documentation: change links to https 2018-10-10 23:11:44 +02:00
Axel Burri 526e332b02 ssh_filter_btrbk.sh: bugfix: ignore --restrict-path for "btrfs subvolume list"
btrbk now runs "btrfs subvolume list" from the mountpoint instead of
the volume path, which for some users is not below --restrict-path. As
the output of "btrfs subvolume list" is the same (complete btrfs tree
for the filesystem), it is ok to ignore the restrict-path here.
2018-10-10 22:51:13 +02:00
Axel Burri f7ef5139de documentation: rephrase ssh setup; cleanup 2018-10-10 00:58:38 +02:00
Axel Burri c087082543 documentation: btrbk.1.asciidoc: add notes on propagation of filter statements 2018-10-09 15:21:30 +02:00
Axel Burri 3528927ea6 btrbk: bugfix: do not keep latest common snapshot for "incremental no"
There is no reason to keep the latest common source snapshot if
"incremental no" is configured (see #252).
2018-10-02 17:28:46 +02:00
Axel Burri 1862bc16d3 documentation: btrbk.1.asciidoc: add note about "prune": source/target must be accessible
Related to: c65f937473
2018-08-27 15:50:36 +02:00
Axel Burri 069304f3bb btrbk: use system_list_mountinfo(), remove system_list_mounts(); rename fs_spec -> mount_source
Reasons for changing to `cat /proc/self/mountinfo`:
 - `/proc/self/mounts` (or `/proc/mounts`) lacks extra info
   (namespaces) and is not documented in kernel (deprecated?).
 - findmnt(8) also uses /proc/self/mountinfo

Refs:
 - https://www.kernel.org/doc/Documentation/filesystems/proc.txt
 - https://bugzilla.redhat.com/show_bug.cgi?id=491924
 - https://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-stable.git/commit/?id=2d4d4864ac08caff5c204a752bd004eed4f08760
2018-08-27 14:54:32 +02:00
Axel Burri e02c2cf249 btrbk: add system_list_mountinfo: parse /proc/self/mountinfo
preparatory patch for removing system_list_mounts().
2018-08-27 14:52:28 +02:00
Axel Burri 37c0e840e9 btrbk: bugfix: use latest longest match for resolving mount point (e.g. for autofs) 2018-08-27 14:49:04 +02:00
Paride Legovini 3dc06c8067 documentation: btrbk.conf.5: clarify behavior of 'snapshot_create ondemand' when there are multiple targets 2018-07-30 03:28:18 +02:00
Axel Burri 0d124a4373 btrbk: fix regression in get_related_subvolumes(): correctly match same btrbk file name scheme
Since we consider all accessible subvolumes in get_related_subvolumes,
checking for equal BTRBK_BASENAME and empty SUBVOL_DIR does not work
when checking for same btrbk file name scheme.

fixes regression: b37ef84e36 (btrbk: always read mountpoints; include all snapshots from mountpoint as candidates for best common parent)
2018-07-18 16:13:33 +02:00
Axel Burri bf5fd7a90b btrbk: cosmetics: fix prototype of get_related_subvolumes() 2018-07-18 16:13:29 +02:00
Axel Burri 1242913d9b btrbk: cosmetics: rename variables (spec -> fs_spec) 2018-07-12 18:26:35 +02:00
Axel Burri 5b1b99c4ed documentation: btrbk.conf.5: add explanation on hostname and caches 2018-07-12 18:26:35 +02:00
Axel Burri 78cec36e30 ssh_filter_btrbk: tighten decompress match expression 2018-07-12 18:26:35 +02:00
Axel Burri 47f6f730ab btrbk: cosmetics: change error message in btrfs_subvolume_delete; add comments 2018-07-12 18:26:35 +02:00
Axel Burri faec212324 btrbk: check if received subvolume is really garbled before deleting it
Improve error handling in btrfs_send_receive: on error, always try to
read the target subvolume and only delete it automatically if it is
garbled (read/write, no received_uuid).

This is especially important if the target subvolume was already
present before send/receive.

Reverts: 4c4afe77 btrbk: skip target metadata test if send/receive has errors
2018-07-12 18:26:35 +02:00
Axel Burri de57efff82 btrbk: bugfix: print all errors if send/receive fails
If stream_compress is enabled and compress command is not found, we
now print "command not found".
2018-07-12 18:26:34 +02:00