Axel Burri
4b7b7cfc06
documentation: btrbk.1: rephrase --format=raw
2021-08-18 02:08:28 +02:00
Axel Burri
af5d25c5a9
btrbk-verify: expect single quotes from btrbk raw table output
2021-08-18 02:08:28 +02:00
Axel Burri
81a04e4287
btrbk: use single quotes for raw table format
2021-08-18 02:08:28 +02:00
Axel Burri
48bf4f05b9
btrbk: fix table output for utf8 characters (require Text::CharWidth)
...
Use Text::CharWidth::mbswidth() if installed, fallback to
length(Encode::decode_utf8()), fallback to length().
- Text::CharWidth handles wide chars (e.g. asian, taking up two
columns on the terminal) correctly.
- length(Encode::decode_utf8()) handles single-width chars only, and
should be installed on most systems (perl >= v5.7.3).
- langth() counts bytes, as we do not convert anything to UTF-8 in
btrbk (NOT using `perl -CIOEioA` or binmode(STDOUT, ":utf8"))
2021-08-18 02:08:28 +02:00
Axel Burri
94a415e420
btrbk: check/sanitize leading/trailing whitespace on files
2021-08-18 02:08:28 +02:00
Axel Burri
77a39282de
ssh_filter_btrbk.sh: allow quoted files
2021-08-18 02:08:28 +02:00
Axel Burri
f7d3823d5d
ssh_filter_btrbk.sh: fix files are always absolute
2021-08-18 02:08:28 +02:00
Axel Burri
3e9b581a54
btrbk: add --unsafe-filenames option
2021-08-18 02:08:28 +02:00
Axel Burri
1a7bbff767
btrbk: tidy run_cmd calls
2021-08-18 02:08:28 +02:00
Axel Burri
27388c7589
btrbk: treat all filenames as unsafe
2021-08-18 02:08:28 +02:00
Axel Burri
2933e65cbe
btrbk: adapt usage of unsafe arguments for run_cmd
2021-08-18 02:08:28 +02:00
Axel Burri
acc7f9fc83
btrbk: quote unsafe characters in shell commands
...
As filenames can contain meta characters like '$', we can't just put
ssh commands in double quotes. E.g. the following would trigger
variable expansion on local shell:
ssh example.com "ls -l 'evil$x'"
Instead, we quote the ssh using single quotes (adding the need to
escape single quotes), while also quoting unsafe filenames using
single quotes. The above becomes:
ssh example.com 'ls -l '\''evil$x'\'''
Or more complex, for a file named "file with'single quotes'":
ssh example.com 'ls -l '\''file with'\''\'\'''\''single quotes'\''\'\'''\'''\'''
On the remote shell, this will expand to:
ls -l 'file with'\''single quotes'\'''
2021-08-18 02:08:28 +02:00
Axel Burri
d7f6d5fecf
btrbk: accept quoted values in config
2021-08-18 02:08:28 +02:00
Axel Burri
5d94de9142
btrbk: use File::Spec for relative file arguments
2021-08-18 02:08:28 +02:00
Axel Burri
eccb24ecd7
btrbk: fix action "usage"
...
Regression from:
b658fba08c
btrbk: print snapdir and targets for action "usage"
2021-08-18 02:08:28 +02:00
Axel Burri
3cf69f3537
btrbk: add missing table ralign
2021-08-18 02:08:28 +02:00
Axel Burri
2f88d5ab4c
btrbk: check for deleted subvol before panicking
2021-08-18 02:08:28 +02:00
Axel Burri
6e7c8c409b
btrbk: cosmetics: fix trace log
2021-08-18 02:08:28 +02:00
Axel Burri
808633a3ae
btrbk-verify: remove workarounds for old versions; tidy eval
2021-08-09 19:06:20 +02:00
Axel Burri
d9958cbbc1
btrbk-verify: use new raw table format keys
2021-08-09 19:06:20 +02:00
Axel Burri
9278211123
btrbk: fix resolved ambiguity in raw table formats
...
rename snapshot_path -> snapshot_subvolume
rename target_path -> target_subvolume
These point to subvolumes, not paths containing subvolumes.
2021-08-09 19:06:20 +02:00
Axel Burri
2347163780
btrbk: table formats: replace source_path with source_subvolume
2021-08-09 19:06:20 +02:00
Axel Burri
e6106c3cda
documentation: btrbk.conf.5: optional volume section
2021-08-09 19:06:20 +02:00
Axel Burri
9a806d85ef
btrbk.conf.example: add simple (non-volume) example; cleanup
2021-08-09 19:06:20 +02:00
Axel Burri
89ea680ce2
documentation: README.md: consequently depict commands with hash
2021-08-09 19:06:20 +02:00
Axel Burri
1eee2c0d2e
documentation: README.md: add non-volume examples
2021-08-09 19:06:20 +02:00
Axel Burri
b658fba08c
btrbk: print snapdir and targets for action "usage"
2021-08-09 19:06:20 +02:00
Axel Burri
7603e03aad
btrbk: never match dummy volume section
2021-08-09 19:06:20 +02:00
Axel Burri
e1c5fd0029
btrbk: remove superfluous checks on volume
2021-08-09 19:06:20 +02:00
Axel Burri
47ea1f9481
btrbk: fix action "config print" for dummy volume section
2021-08-09 19:06:20 +02:00
Axel Burri
e257077241
btrbk: allow subvolume context without volume (add dummy section)
...
Unfortunately the framework relies on "url" for the volume. This
should not be printed anywhere, using "/dev/null" should be fine.
2021-08-09 19:06:20 +02:00
Axel Burri
e2de9de440
btrbk: expand subvolume globs independent of volume
2021-08-09 19:06:20 +02:00
Axel Burri
3b4f275126
btrbk: accept absolute path for subvolume
2021-08-09 19:06:20 +02:00
Axel Burri
d40d75ef76
btrbk: accept absolute path for snapshot_dir
2021-08-09 19:06:20 +02:00
Axel Burri
5b2644f12a
btrbk: fix check_file: accept both relative and absolute options
2021-08-09 19:06:20 +02:00
Axel Burri
d3d04f2252
btrbk: remove subvolume_path from schedule table
...
This is the only format where SUBVOL_PATH is displayed. As SUBVOL_PATH
is only available for vinfo_child, this can not be used in global
scope.
2021-08-09 19:06:20 +02:00
Axel Burri
c1610c754d
btrbk: cleanup: add config_subsection
2021-08-09 19:06:20 +02:00
Axel Burri
247cb37acf
btrbk: add comment on vinfo_child specific keys
2021-08-09 19:06:20 +02:00
Axel Burri
2d854c7327
btrbk: add comment on clone source from different mount point
2021-08-09 19:06:20 +02:00
Axel Burri
86e902cebc
btrbk: remove dead code
2021-08-09 19:06:20 +02:00
Axel Burri
ce9c21bd24
btrbk: tidy check for btrbk subvolume
...
The original idea was probably to have a trace log for skipped
subvols.
2021-08-09 19:06:20 +02:00
Axel Burri
f86c563715
btrbk: tidy superfluous subvol_dir argument
2021-08-09 19:06:20 +02:00
Axel Burri
2da30f6b96
btrbk: bump version to 0.32.0-dev
2021-08-09 19:06:20 +02:00
Ingmar Lippert
fa3204cd7e
documentation: README.md: fix spelling
...
spelling correction
2021-08-08 20:36:23 +02:00
Axel Burri
feba54a68d
change version to 0.31.3; update ChangeLog
2021-08-07 00:13:21 +02:00
Axel Burri
bddd7a1d69
Makefile: add btrbk_restore_raw.py to script install targets
2021-08-06 23:33:17 +02:00
fr3aker
82860f0f4c
btrbk_restore_raw.py: add script for restoring raw backups
2021-08-06 23:33:17 +02:00
ullr23@gmail.com
322ae2c78f
btrbk: add support for zstd adaptive compression
...
Requires zstd version >= 1.3.6
2021-08-06 17:51:20 +02:00
Axel Burri
907a5065ab
documentation: add "resume" example; rephrase "ondemand" example
2021-08-06 16:55:53 +02:00
Axel Burri
bf0b5997e8
btrbk: allow relative path arg for actions: archive, extents, diff, origin
2021-08-01 14:11:50 +02:00