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.
Note: This does not **use** the latest rustic core, but makes the
necessary modifications to make it work with `rustic_core` after the
latest dependency updates.
Bumps [zip](https://github.com/zip-rs/zip2) from 2.2.1 to 2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.0</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Add support for NTFS extra field (<a
href="https://redirect.github.com/zip-rs/zip2/pull/279">#279</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li><em>(test)</em> Conditionalize a zip64 doctest (<a
href="https://redirect.github.com/zip-rs/zip2/pull/308">#308</a>)</li>
<li>fix failing tests, remove symlink loop check</li>
<li>Canonicalize output path to avoid false negatives</li>
<li>Symlink handling in stream extraction</li>
<li>Canonicalize output paths and symlink targets, and ensure they
descend from the destination</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Fix clippy and cargo fmt warnings (<a
href="https://redirect.github.com/zip-rs/zip2/pull/310">#310</a>)</li>
</ul>
<h2>v2.2.3</h2>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Change the inner structure of <code>DateTime</code> (<a
href="https://redirect.github.com/zip-rs/zip2/issues/267">#267</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>cargo fix --edition</li>
</ul>
<h2>v2.2.2</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>rewrite the EOCD/EOCD64 detection to fix extreme performance
regression (<a
href="https://redirect.github.com/zip-rs/zip2/issues/247">#247</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.2.3...v2.3.0">2.3.0</a>
- 2025-03-16</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Add support for NTFS extra field (<a
href="https://redirect.github.com/zip-rs/zip2/pull/279">#279</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li><em>(test)</em> Conditionalize a zip64 doctest (<a
href="https://redirect.github.com/zip-rs/zip2/pull/308">#308</a>)</li>
<li>fix failing tests, remove symlink loop check</li>
<li>Canonicalize output path to avoid false negatives</li>
<li>Symlink handling in stream extraction</li>
<li>Canonicalize output paths and symlink targets, and ensure they
descend from the destination</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Fix clippy and cargo fmt warnings (<a
href="https://redirect.github.com/zip-rs/zip2/pull/310">#310</a>)</li>
</ul>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.2.2...v2.2.3">2.2.3</a>
- 2025-02-26</h2>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Change the inner structure of <code>DateTime</code> (<a
href="https://redirect.github.com/zip-rs/zip2/issues/267">#267</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>cargo fix --edition</li>
</ul>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.2.1...v2.2.2">2.2.2</a>
- 2024-12-16</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>rewrite the EOCD/EOCD64 detection to fix extreme performance
regression (<a
href="https://redirect.github.com/zip-rs/zip2/issues/247">#247</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6eab5f5cc6"><code>6eab5f5</code></a>
chore: release v2.3.0 (<a
href="https://redirect.github.com/zip-rs/zip2/issues/300">#300</a>)</li>
<li><a
href="e4aee2050f"><code>e4aee20</code></a>
implement <code>ZipFile::options</code> + refactor options normalization
(<a
href="https://redirect.github.com/zip-rs/zip2/issues/305">#305</a>)</li>
<li><a
href="ea8a7bba24"><code>ea8a7bb</code></a>
fix(test): Conditionalize a zip64 doctest (<a
href="https://redirect.github.com/zip-rs/zip2/issues/308">#308</a>)</li>
<li><a
href="365c81a39f"><code>365c81a</code></a>
Use <code>xz2</code> crate instead of a custom implementation (<a
href="https://redirect.github.com/zip-rs/zip2/issues/306">#306</a>)</li>
<li><a
href="ae94b3452b"><code>ae94b34</code></a>
chore: Fix clippy and cargo fmt warnings (<a
href="https://redirect.github.com/zip-rs/zip2/issues/310">#310</a>)</li>
<li><a
href="a2e062f370"><code>a2e062f</code></a>
Merge commit from fork</li>
<li><a
href="0199ac2cb8"><code>0199ac2</code></a>
Simplify handling for symlink targets</li>
<li><a
href="977bb9479d"><code>977bb94</code></a>
fix failing tests, remove symlink loop check</li>
<li><a
href="3cb29e70d1"><code>3cb29e7</code></a>
Partial fix for tests</li>
<li><a
href="2182b07686"><code>2182b07</code></a>
Refactor</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v2.2.1...v2.3.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/rustic-rs/rustic/network/alerts).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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>
If you have a long-running process, like `webdav` or `backup` or others,
pressing CTRL+C usually results in a non-zero exit code:
`process didn't exit successfully:
P:\CARGO\.cargo-target-win\debug\rustic.exe -P <PROFILE> webdav (exit
code: 0xc000013a, STATUS_CONTROL_C_EXIT)`
This shouldn't be the case, as it was user initiated and we can shut
down gracefully.
This PR adds this functionality, so CTRL+C shuts down `rustic`
gracefully and exits with a 0 exit-code.
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: aawsome <37850842+aawsome@users.noreply.github.com>
Adds filtering using `jq` syntax. You can do something like `--filter-jq
'.summary.files_new > 51'` - works similar to what you'd expect from
`jq`.
Also puts the `rhai` and `jq` filtering into features which are enabled
by default.
---------
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 the `mount` command to rustic to access snapshot contents
as a read-only filesystem when the feature-flag `mount` is chosen.
As for the `webdav` command, there are following options:
- Access to a concrete snapshot/path, e.g. `rustic mount /mnt
37a63e5b:/my/path`.
- Access to all snapshots (maybe restricted by filters) by using
templates to define a virtual directory structure where snapshots are
located. Example: `rustic mount /mnt --path-template
"[{hostname}]/[{label}]/{time}" --time-template "%Y-%m-%d_%H-%M-%S"`
(these are also defined as default). Note that for all dirs containing
only snapshots, also a `latest` entry is generated. `latest` and
identical subsequent snapshots are symlinks when using `mount`.
This PR uses fuse_mt which is not optimal as it introduces some overhead
(e.g. needs to save whole Paths in-memory).
Note: Requires https://github.com/rustic-rs/rustic_core/pull/331 to
properly show all data of files (without it builds and runs, but files
are truncated and return error when reading).
Note: Building with the `mount` feature flag requires special
dependencies and is only possible on supported platforms, see
https://github.com/cberner/fusercloses#971
---------
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
The `dump` command will now produce a tar when called with a directory.
---------
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
chore(deps): update dependencies: tokio, ratatui, and tui-textarea
fix(clippy): use of deprecated method `ratatui::widgets::Table::<'a>::highlight_style`: use `Table::row_highlight_style` instead
Update rustic_core and rustic_backend to incorporate fixes. See their
changelogs for more information.
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
This contains an immediate fix for a newly introduced bug in
`rustic_core v0.5.2` that involved how the `TreeStreamerOnce` handled
errors when a channel was full.
Fixes v0.9.2 breaks prune operations #1313
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>
Due to changes in the way how merging of values were applied to
configuration values in `BackendOptions` this should is considered a
fix. Now values from the configuration file don't overwrite values from
environment variables, any more. As it was intended and stated in the
documentation.
Please make sure, your workflow is still working as intended, especially
that the configuration values and environment variables are applied as
you wanted it and as we documented it in the Configuration
documentation.
Precedence also applies when inheriting options from other profiles
using `use-profiles` or when using multiple profiles, e.g. `rustic -P
one -P two`. If the same repository option is defined in `one` and `two`
the value of `one` is taken. Before the fix, the value of `two` was
taken. But the fix only applies to the repository options. For other
options, `one` always had precedence.
Fixes#1226
---------
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: Alexander Weiss <alex@weissfam.de>
This PR contains the following updates:
| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Configuration
📅 **Schedule**: Branch creation - "before 4am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rustic-rs/rustic).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiQS1kZXBlbmRlbmNpZXMiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [rstest](https://redirect.github.com/la10736/rstest) |
dev-dependencies | minor | `0.22` -> `0.23` |
---
### Release Notes
<details>
<summary>la10736/rstest (rstest)</summary>
###
[`v0.23.0`](https://redirect.github.com/la10736/rstest/blob/HEAD/CHANGELOG.md#0230-2024929)
[Compare
Source](https://redirect.github.com/la10736/rstest/compare/v0.22.0...v0.23.0)
##### Add
- You can now use environment variables in `#[files]` with an optional
default value (see
[#​277](https://redirect.github.com/la10736/rstest/pull/277)).
- You can now set a base_dir for `#[files]` with the `$[base_dir =
"..."]` attribute (see
[#​277](https://redirect.github.com/la10736/rstest/pull/277)).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rustic-rs/rustic).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiQS1kZXBlbmRlbmNpZXMiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [tempfile](https://stebalien.com/projects/tempfile-rs/)
([source](https://redirect.github.com/Stebalien/tempfile)) |
dev-dependencies | minor | `3.12.0` -> `3.13.0` |
---
### Release Notes
<details>
<summary>Stebalien/tempfile (tempfile)</summary>
###
[`v3.13.0`](https://redirect.github.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3130)
[Compare
Source](https://redirect.github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0)
- Add `with_suffix` constructors for easily creating new temporary files
with a specific suffix (e.g., a specific file extension). Thanks to
[@​Borgerr](https://redirect.github.com/Borgerr).
- Update dependencies (fastrand & rustix).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rustic-rs/rustic).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiQS1kZXBlbmRlbmNpZXMiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>