Adds the possibility to compare two snapshots interactively.
From the interactive snapshots view, press `D` to get to the diff view.
If two snapshots are marked, this diffs the two marked snapshots. If one
snapshot is marked or selected, this diffs with its parent (if there is
one).
Alternatively, you can use `rustic diff -i` to select snapshots/paths
directly.
The PR also allows to recursively compute added/removed space for dirs
and subdirs using `s` (like in #1479)
This PR is breaking as it also changes the output format of the normal
`diff` command.
This PR extends the logging. For `backup`, `forget`, `prune` the stdout
output is now printed via an INFO log which allows to see this
information also in the log file.
Moreover, when using a log file, rustic now also logs the version and
the used command.
closes#1454closes#1080
Adds output as targz and zip.
Also adds the options `--archive` to choose the ouput format and
`--file` to directly specify a file to dump into. When a file is
specified, the ouput format is automatically chosen from the file
extension, if given.
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
This is the first PR to lay some foundations to test rustic's
compatibility against a restic repository. It should essentially show,
how to start out with it and give some fixtures to play around with.
TODO:
- [X] add CI workflow + test that uses restic (latest) via
https://github.com/AnimMouse/setup-restic, to create a new repo and run
rustic against it
- [X] investigate `AnimMouse/setup-restic` failure and fix
- [X] forked `AnimMouse/setup-restic` to `rustic-rs/setup-restic` to run
on `@main` and apply faster fixes to our CI
- [X] used `AnimMouse/setup-restic` as a foundation for
`rustic-rs/setup-rustic`, still WIP
- [x] update to 'release' feature in test when #1307 is merged
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
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>