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
Axel Burri
9aeaf2b15c
btrbk: fix regression introduced with btrfs_subvolume_list_complete
...
If btrfs_subvolume_show($vol, rootid => 5) fails, there are no
"received_uuid" and no "gen" keys in the root node.
Fixes: 0acbf74c57
(btrbk: add btrfs_subvolume_list_complete: fetch all subvolumes with all flags)
2018-07-09 18:46:24 +02:00
Axel Burri
669a34357a
btrbk: bugfix: handle corner case: url="ssh://my.host" (without trailing slash)
...
As we allow <url> to be specified as "<hostname>:<directory>", an URL
"ssh://my.host" (without trailing slash) was parsed as hostname="ssh",
directory="/my.host".
2018-07-09 16:13:48 +02:00
Axel Burri
c2022a5b2f
documentation: add text for "subvolume ." configuration
2018-07-09 16:13:00 +02:00
Axel Burri
0acbf74c57
btrbk: add btrfs_subvolume_list_complete: fetch all subvolumes with all flags
...
Wrapper, returns complete list of all subvolumes (including btrfs
root, id=5) with all flags. Requires three calls to btrfs-progs.
Adaptions and cleanup in btr_tree().
2018-07-09 16:13:00 +02:00
Axel Burri
d15133b3d4
btrbk: snapshot_name defaults to volume name if subvolume name is "."
2018-07-09 16:13:00 +02:00
Axel Burri
7088a91fa3
btrbk: cosmetics: sanitize trailing "/." in check_file()
2018-07-09 16:13:00 +02:00
Axel Burri
de5004c744
btrbk: abort subvolume if it is btrfs root (id=5)
...
Btrfs root subvolume (id=5) have no UUID and cannot be backed
up. Abort if "subvolume ." is configured on btrfs root, e.g.:
volume /path/to/btrfs_root
subvolume .
2018-07-09 16:13:00 +02:00
Axel Burri
b0d58fd0f1
btrbk: btr_tree: always read btrfs root node (id=5), hoping to get its uuid
...
Note that the UUID for btrfs root (id=5) is not always present:
- btrfs-progs < 4.12 does not support rootid lookup
- UUID can be missing if filesystem was created with btrfs-progs < 4.16
Still we need to always read it, as the whole tree is cached and we
don't know if it will be used.
2018-07-09 16:13:00 +02:00
Axel Burri
cb5e361f7a
btrbk: add --rootid command option for "btrfs subvolume show"
2018-07-09 16:13:00 +02:00
Axel Burri
1aa0fe1aad
btrbk: remove obsolete realpath_cache update in btrfs_subvolume_show()
...
Recent btrfs-progs do not print the real path any more, this is now
handled by btrfs_mountpoint() -> system_realpath().
2018-07-09 16:13:00 +02:00