Axel Burri
b50bee3b20
btrbk: print distinct backup create / delete schedule
...
While it is nice to have a combined schedule output, this does not
reflect reality: btrbk runs the scheduler for each individual step.
Patching in "created" results into "delete" schedule is error-prone
(especially if send/receive fails).
2023-04-22 16:53:13 +02:00
Axel Burri
ee3e761c81
btrbk: tidy whitespace
2023-04-22 16:53:13 +02:00
Axel Burri
ef89709d96
btrbk: remove vinfo_subvol_list btrbk_direct_leaf filter
2023-04-22 16:53:13 +02:00
Axel Burri
3347a00cea
btrbk: use get_btrbk_snapshot_siblings where applicable
2023-04-22 16:53:13 +02:00
Axel Burri
c6aa1d7b77
btrbk: use get_btrbk_snapshot_siblings in get_best_parent
2023-04-22 16:53:13 +02:00
Axel Burri
5665fae87c
btrbk: honor timeshift format in get_btrbk_snapshot_siblings
2023-04-22 16:53:13 +02:00
Axel Burri
d9dbc432c3
btrbk: add get_btrbk_snapshot_siblings
...
replacement for: vinfo_subvol_list(..., btrbk_direct_leaf => )
2023-04-22 16:53:13 +02:00
Axel Burri
a6f7e67388
btrbk: filter for family=btrbk on archive
...
We don't support families other than "btrbk" yet: timeshift uses
subdirs, and there's too many places where the snapshot_dir is
supposed to be the directory where the snapshots reside in.
2023-04-22 16:53:13 +02:00
Axel Burri
17621ce3d4
btrbk: refactor add_btrbk_filename_info
...
preparatory for adding timeshift / snapper relations
2023-04-22 16:53:13 +02:00
Axel Burri
bb704cde74
btrbk: make snaproot optional for get_best_parent
2023-04-22 16:53:13 +02:00
Axel Burri
98580418e3
btrbk: fix displaying excluded in summary
...
- fix framework
- print source excluded by archive_exclude in summary
- fix exclude list in summary
2023-04-22 16:53:13 +02:00
Axel Burri
135edabc71
btrbk: rephrase warnings on unexpected (foreign) location
2023-04-22 16:51:32 +02:00
Axel Burri
4ba944e6a5
btrbk: fix exit status for action usage
2023-04-22 16:51:32 +02:00
Axel Burri
dd7149b111
btrbk: improve error message
2023-04-22 16:51:32 +02:00
Axel Burri
ed33db523c
btrbk: add reason text to filter statements
2023-04-22 16:51:32 +02:00
Axel Burri
15a6b98a08
btrbk: print "create" action in schedule
2023-04-22 16:51:32 +02:00
Axel Burri
eff9af34bc
btrbk: fix print schedule if deletion is skipped
...
If deletion is skipped, we don't have a schedule call on the target,
which is used for --print-schedule text. Add some (rather hacky) code
to be able to also use the schedule result of the backup process.
2023-04-22 16:51:32 +02:00
Axel Burri
468ca1eae5
btrbk: tidy logging
...
Especially corrects $svol->{PRINT} where not applicable.
2023-04-22 16:51:32 +02:00
Axel Burri
cca200707d
btrbk: set subvolume url to /dev/null on archive
...
This should not be printed anywhere. If it is, it's a bug.
2023-04-22 16:51:32 +02:00
Axel Burri
d4ab986245
btrbk: skip subvolume init on archive
2023-04-22 16:51:32 +02:00
Axel Burri
6f1145c279
btrbk: add archive related summary
...
Note that "no target action" for archive is replaced by "<no_action>",
for consistency with action run:
[-] /path/to/target/snapshot_basename.*
is now displayed as:
<no_action>
2023-04-22 16:51:32 +02:00
Axel Burri
6d047cbaec
btrbk: disable target_create_dir for user; fix dryrun
2023-04-22 16:51:32 +02:00
Axel Burri
e737927bd9
btrbk: tidy variable names
2023-04-22 16:51:32 +02:00
Axel Burri
053cd7a59c
btrbk: use parser function for assembling archive config
2023-04-22 16:51:32 +02:00
Axel Burri
443cb1891b
btrbk: action_archive: no strict_related parent search
...
strict_related parent search does not make much sense on archive: on
targets, parent_uuid chain is broken after first prune.
Ref: 318126b831
2023-04-22 16:51:32 +02:00
Axel Burri
ac0f7e3b91
btrbk: action_archive: honor archive_exclude_older in backup step
2023-04-22 16:51:32 +02:00
Axel Burri
d12241fcfc
btrbk: action_archive: use correct config_preserve_hash
2023-04-22 16:51:32 +02:00
Axel Burri
1465a1ecc2
btrbk: use same code for backup and archive
...
Note that some functionality breaks with this commit. Specific
adaptions are done in following commits.
2023-04-22 16:51:32 +02:00
Axel Burri
c385b0b731
btrbk: create dir if target_create_dir is set
2023-04-22 16:51:32 +02:00
Axel Burri
7aece45dbf
btrbk: add vinfo_mkdir
2023-04-22 16:51:32 +02:00
Axel Burri
2bdd5eb8fc
btrbk: use vinfo_realpath
2023-04-22 16:51:32 +02:00
Axel Burri
30b22d49d2
btrbk: add vinfo_realpath
2023-04-22 16:51:32 +02:00
Axel Burri
544d95e094
btrbk: add comment
2023-04-22 16:51:32 +02:00
Axel Burri
fe137bd19c
btrbk: honor --exclude on delete
2023-04-22 16:51:32 +02:00
Axel Burri
6d57aa4dbe
documentation: honor --exclude on backup candidates
2023-04-22 16:51:32 +02:00
Axel Burri
4c174c8f72
btrbk: honor --exclude on backup candidates
2023-04-22 16:51:32 +02:00
Axel Burri
c0da910276
btrbk: on resume, abort on unexpected if receive target is not present
...
A more sophisticated implementation would be to check this after
scheduling, only if the target really needs to be backuped.
We could as well automatically trigger a `btrfs snapshot -r` on target
in these cases, but this seems counter-intuitive.
2023-04-22 16:51:32 +02:00
Axel Burri
d498dbb5c3
btrbk: list unexpected archive targets when aborting
2023-04-22 16:51:32 +02:00
Axel Burri
61691abbfc
documentation: update deletion of raw targets
2023-04-22 16:51:32 +02:00
Axel Burri
c4bf7b0c5a
btrbk: use depends callback for raw depends
2023-04-22 16:51:32 +02:00
Axel Burri
6373e32875
btrbk: add depends callback to scheduler
2023-04-22 16:51:32 +02:00
Axel Burri
2a1a42e824
btrbk: related_nodes: add fatal option
2023-04-22 16:51:32 +02:00
Axel Burri
e93952b08b
btrbk: related_nodes: return reference instead of array
...
Preparatory for adding fatal option returning undef.
2023-04-22 16:51:32 +02:00
Axel Burri
131e75376f
btrbk: fix raw parent_uuid
2023-04-22 16:51:32 +02:00
Axel Burri
b77abb3eff
btrbk: abort if cmdline specified config not found
2023-04-22 16:51:32 +02:00
Axel Burri
799d235218
btrbk: remove double-slash from file arguments
...
Sanitize file (or subvolume path) arguments in safe_cmd, effectively
removing leading double slash.
Files originating from "volume /" can be assembled as "//some/subvol",
which is useful internally but undesired as command arguments, as
ancient systems might interpret leading double slash "//" in a special
way.
Posix states:
> A pathname that begins with two successive slashes may be
> interpreted in an implementation-defined manner, although more than
> two leading slashes shall be treated as a single slash.
2023-04-22 16:51:32 +02:00
Axel Burri
b9c5e3fc29
btrbk: bump version to 0.33.0-dev
2023-04-22 16:51:32 +02:00
Axel Burri
73c5d180f6
documentation: rephrase lockfile
2023-04-22 16:51:32 +02:00
Axel Burri
ac42b29b0a
bump copyright year
2023-04-10 16:04:27 +02:00
Axel Burri
5e44bc6a3e
change version to 0.32.6; update Changelog
2023-03-25 17:19:14 +01:00