Axel Burri
c03e960d90
ssh_filter_btrbk.sh: exclude "btrfs subvolume show|list" from restrict-path
...
btrbk requires "btrfs subvolume list|show" queries from the mount
point in order to build btrfs trees. This conflicts with tightly set
--restrict-path.
2020-01-02 17:56:03 +01:00
Axel Burri
5407b863df
documentation: btrbk.1: add missing option -L, --long
2020-01-02 16:58:07 +01:00
Axel Burri
0d19b0243e
btrbk: action ls: change default output to format=short
2020-01-02 16:58:07 +01:00
Axel Burri
c5b3ebb808
btrbk: action ls: allow multiple path arguments; soft fail on errors
2020-01-02 16:58:07 +01:00
Axel Burri
73c24e0495
documentation: btrbk.conf.5: explain stream_buffer_remote
2020-01-02 16:58:07 +01:00
Axel Burri
631a4c30fe
btrbk: fix @stderr propagation from vinfo_init_root
...
As we print @stderr in warnings if vinfo_init_root() function fails,
we need to make sure that @stderr contains sane values.
Clearing @stderr is required when calling caching functions!
2019-12-15 20:03:37 +01:00
Axel Burri
67d24695f1
btrbk: logging prints "..." on consecutive lines
2019-12-15 20:03:37 +01:00
Axel Burri
1f7773dddc
btrbk: try readlink only once per url
...
Change semantics of %realpath_cache: if "" (empty string), do not try
to run readlink shell command again on same URL.
2019-12-15 19:12:14 +01:00
Axel Burri
8c11c2eb7d
btrbk: run_cmd: fix regression: dont print ssh errors
...
Explicitely printing ssh errors (or even warnings) is
inconsistent. stderr is printed outside the run_cmd framework if
needed.
reverts a80e05984a
btrbk: catch ssh errors
See ssh(1):
ssh exits with the exit status of the remote command or with 255
if an error occurred.
Note that this includes network errors as well as dns failures
2019-12-15 19:12:06 +01:00
Axel Burri
9e13dbd933
btrbk: init sroot as late as possible when expanding wildcards
2019-12-15 19:10:01 +01:00
Axel Burri
37b30caeb2
btrbk: bugfix: vinfo_match: skip match against invalid paths
...
Dont check url_regex if $vinfo->{URL} is not a valid path (e.g. when
checking against a "volume" or "subvolume" having wildcards):
"Use of uninitialized value in join or string" at line 3030
2019-12-14 17:06:15 +01:00
Axel Burri
c36890e1eb
btrbk: change version to 0.29.1-dev
2019-12-14 17:05:54 +01:00
Axel Burri
a447c4b939
documentation: btrbk.conf.5: add note about ssh_compression / stream_compress relation
2019-12-07 14:07:56 +01:00
asymmetric
3694a38670
documentation: README.md: replace pv with mbuffer
...
Since 0.29, mbuffer is used instead of pv.
2019-10-30 18:24:35 +01:00
Axel Burri
b64ffbacf5
change version to 0.29.0; update ChangeLog
2019-10-27 14:00:40 +01:00
Ryan Young
0f21df15c2
ssh_filter_btrbk.sh: whitelist mkdir for 'btrbk archive' operations
2019-10-27 12:24:00 +01:00
Asbjørn Apeland
2d7f5ec5fe
contrib: systemd: btrbk.timer: change install target
...
Using `WantedBy=multi-user.target` makes boot wait for btrbk.service
before it's considered "finished". This can be checked by running
`systemd-analyze` or checking the system log using `journalctl`.
Timers should use the "timers.target" target, see systemd.special(7).
2019-10-27 12:24:00 +01:00
Axel Burri
a109a58b35
documentation: btrbk.1: cosmetics
2019-09-08 18:23:30 +02:00
Axel Burri
3631cf6c7f
ssh_filter_btrbk.sh: cosmetics: show unsafe character
2019-09-08 18:23:30 +02:00
Axel Burri
8551a9f52a
btrbk: consistently use "subvolume" (instead of "subvol") for table headings
2019-09-08 18:23:30 +02:00
Axel Burri
5e87e8248b
btrbk: add --pretty option: print lowercase column headings with separator line
2019-09-08 18:23:30 +02:00
Axel Burri
4629d5ae11
btrbk: change table output format: remove separator line, uppercase column headings
...
Print table output column headings single-line uppercase instead of
lowercase and underlined.
This is common ascii table format, is easy parseable and offers better
readability e.g. in pager.
2019-09-08 18:23:30 +02:00
Axel Burri
485bc3ab0c
btrbk: use global stderr (replace err); refeactor filter_stderr, add fatal_stderr
...
if fatal_stderr is set and returns true, the command exit code is set
to -1, resulting in run_cmd() returning undef.
2019-09-08 18:23:30 +02:00
Axel Burri
360c8918bb
btrbk: catch verbose errors from readlink
...
readlink -v enables "report error messages", printing useful errors
like:
readlink: /some/dir/: Permission denied
readlink: /some/dir/: No such file or directory
2019-09-08 18:23:30 +02:00
Axel Burri
6e4aeae323
btrbk: cosmetics: enhance trace log
2019-09-08 18:23:30 +02:00
Axel Burri
d0f0c18f64
btrbk: logging functions take array as argument
2019-09-08 18:23:29 +02:00
Axel Burri
fa3334cbb7
btrbk: btrfs_subvolume_list_readonly_flag: dont die on parse errors
2019-09-08 18:23:29 +02:00
Axel Burri
3798677893
btrbk: run_cmd: return array of stdout lines instead of scalar
2019-09-08 18:23:29 +02:00
Axel Burri
6227bb591a
ssh_filter_btrbk.sh: return exit status 255 on error
...
This makes btrbk regard ssh_filter_btrbk errors as ssh errors, as ssh
also returns exit status 255 if an error occurred.
2019-09-08 18:23:29 +02:00
Axel Burri
4e39ed0fca
btrbk: print ssh errors (remove -q option)
2019-09-08 18:23:29 +02:00
Axel Burri
9f347a1067
btrbk: use open3 in run_cmd: fetch stderr separately
2019-09-08 18:23:29 +02:00
Axel Burri
a80e05984a
btrbk: catch ssh errors
2019-09-08 18:23:29 +02:00
Axel Burri
df471c3692
btrbk: refactor filter_stderr; more flexible error handling in run_cmd; simplify btrfs_subvolume_delete parsing
2019-09-08 18:23:29 +02:00
Axel Burri
8434c6881c
btrbk: system_list_mountinfo: also fetch mount_options (not only super_options)
...
This should have no impact on current code: "subvol" and "subvolid"
are used, which are only in super_options.
2019-09-08 18:23:29 +02:00
Axel Burri
8570ee585d
btrbk: fix backup summary: dont display no_action if volume is skipped by --exclude or noauto
...
The backup summary does not print "<no_action>" if a subvolume is
skipped by --exclude or noauto. Alas, skipped volumes results in
no_action still being printed (see #291 ). Adding an additional
IS_ABORTED($sroot, "skip_") check fixes this issue.
2019-09-07 13:44:25 +02:00
Axel Burri
2c9f1389a0
btrbk: fix vinfo() prototype; remove dead code; fix scheduler text; fix action diff header text
2019-08-07 21:35:54 +02:00
Axel Burri
4845bc6691
btrbk: print_formatted: fix skip-row-if-empty for --print-schedule
...
Fix: dont modify "-" %table_formats hash key.
fixes 716d420a40
btrbk: print_formatted: add skip-row-if-empty functionality for table_formats
2019-08-06 17:29:45 +02:00
Axel Burri
3ea7746700
btrbk: cosmetics: separate get_btrbk_date function
2019-08-05 15:15:55 +02:00
Axel Burri
ac175c0093
btrbk: cosmetics: rename timestamp_postfix_match -> btrbk_timestamp_match
...
Take separator match "\." out of statement:
$timestamp_postfix_match == \.$btrbk_timestamp_match
Remove/Fix unneeded "timestamp" hash key (dead code).
2019-08-05 15:15:55 +02:00
Axel Burri
8b93ef7c82
btrbk: fix fallback_default_config
...
- add for action-archive
- exit if config is present but has parse errors
2019-08-05 15:15:55 +02:00
Axel Burri
3e40903720
btrbk: add btrbk archive --raw option
2019-08-05 15:15:30 +02:00
Axel Burri
dcc57abac4
btrbk: archive: also apply exclude patterns on source subvolumes
...
Allows patterns like "svol.2019*".
Needs @exclude_vf to be a global variable, which is ok as this only
holds command-line args (and global context for archive_exclude).
Note that adding the same in "create backups" (action run) and
macro_delete() is not a good idea, as this has weird implications on
the "forced: last" snapshot/backup pair.
2019-08-05 14:55:38 +02:00
Axel Burri
6e55e08db7
btrbk: add archive_exclude_older option: skip resume of old backups
2019-08-05 14:55:38 +02:00
Axel Burri
97240de0c9
btrbk: add -L, --long options (shortcut for --format=long)
2019-08-05 14:54:04 +02:00
Axel Burri
66d15d1d64
btrbk: action "ls": add mount_subvol column to long formats
2019-08-05 14:54:04 +02:00
Axel Burri
e297d37560
ChangeLog: adapt migration instructions for stream_buffer and rate_limit
2019-08-05 14:54:04 +02:00
Axel Burri
8d0d7edda7
ssh_filter_btrbk.sh: adaptions, use mbuffer for rate_limit
2019-08-05 14:54:04 +02:00
Axel Burri
c9fb366d09
btrbk.conf.example: suggest stream_buffer=256m; adapt text; add links
2019-08-04 23:08:11 +02:00
Axel Burri
06a7a53fee
documentation: btrbk.conf.5: add rate_limit_remote, fix stream_buffer / rate_limit text
2019-08-04 23:08:11 +02:00
Axel Burri
0435f32619
btrbk: add stream_buffer_remote, rate_limit_remote; run stream_buffer only on local host
...
Change sematics of stream_buffer: If set, run on local host only. If a
remote stream buffer is required, use stream_buffer_remote /
rate_limit_remote.
2019-08-04 23:08:11 +02:00