This PR adds `run-before`, `run-after`, `run-failure` and `run-finally`
hooks for:
- all commands in the `[global.hooks]` config profile section
- commands accessing the repository in the `[repository.hooks]` config
profile section
- the `backup` command specifically in the `[backup.hooks]` config
profile section
- specific backup sources in the `[backup.snapshots.hooks]` section
Note: This PR includes only calling the given commands. If there is the
wish for supplying information to the commands (env variables or
parameter substitution), this should be covered by a separate feature
request/PR.
closes#902
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
Adds the following filter options:
- `filter-paths-exactly` - filters exactly the given pathlists
(supersets don't match)
- `filter-tags-exactly` - filters exactly the given taglists (supersets
don't match)
- `filter-before` - filters by time (date or date+time can be given)
- `filter-after` - filters by time (date or date+time can be given)
- `filter-size` - filters by size of snapshot'ed data (upper and lower
limit may be given)
- `filter-size-add` - filters by size added to the repository (upper and
lower limit may be given)
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
-- BREAKING CHANG --
Using multiple paths for a sources in the config file caused many
problems as the syntax was unclear and problems existed in edge cases.
This PR changes the definition of sources in config profile files:
- a single path path can be specified as before, i.e. using `source =
"/my/path"`.
- multiple paths must now be given in an array:
```
source = ["/my/path1", "/my/path2"]
```
Note that
```
source = "/my/path1 /my/path2"
```
is now interpreted a a single path using the dir-tree "my","path1 "
(with space), "my", "path2".
closes#1122closes#1094
Adds the `--check-index` option. This is an alternative to `rustic
repair index` in cases where the repository is read-only and cannot be
repaired.
Using this option, the index is checked against existing pack files and
missing information is read from the pack headers.
The intention of this PR is to make it easier (more straight forward) to
write `rustic` integration tests by utilizing the `assert_cmd` and
`predicates` crates.
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>