Commit Graph

1654 Commits

Author SHA1 Message Date
aawsome
3d13f2e527
refactor: move webdavfs from rustic_core to rustic-rs (#1363)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-23 14:00:59 +00:00
nardoor
c3e2557743
feat(async): use is_async_compatible() to determine backend incompatibility and error out (#1355)
Use `getters` to early exit webdav when using `async_incompatible`
backends.

Using the type system or fixing all async compatibility issue is big and
structural work.
To avoid runtime crash for our users I suggest using this getter as a
temporary fix.

tracking issue: https://github.com/rustic-rs/rustic/issues/1181 (see for
more details)

> As far as I could tell, `webdav` feature was the only one spawning a
`runtime` in `rustic` and using it.

### Before merging this one:
- [x] rustic_core (core and backend) must be updated to a release that
includes rustic-rs/rustic_core#355.

---------

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-21 15:48:56 +00:00
simonsan
ae6f258dd2
chore(clippy): comment out unused lints in lib.rs
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-20 04:37:52 +01:00
simonsan
a0e91053c7
chore(clippy): apply fixes automatically
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-20 04:22:44 +01:00
simonsan
99d28fa0c3
refactor: use BTreeMap for env in global options (#1360)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>

---------

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: nardoor <102725206+nardoor@users.noreply.github.com>
2024-11-19 22:20:55 +01:00
simonsan
47426dbfb4
testing: add tiny framework for testing rustic's compat with latest restic (#1303)
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>
2024-11-19 02:51:24 +01:00
simonsan
b0bd5b6e65
test: use snapshot tests for default config, show-config and completions (#1359)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-19 02:28:37 +01:00
simonsan
b8deb789eb
chore(deps): update dependencies rustic_core, rustic_backend, rustic_testing, and migrate to conflate 0.3 (#1357)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-19 00:49:00 +01:00
simonsan
5cb7d593e0
chore: fix typos
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-19 00:13:22 +01:00
Timtor
62f608746e
build(docker): support arm64 docker image (#1351)
This PR create a new building target `aarch64-unknonw-linux-musl`, as
`aarch64-unknonw-linux-gnu` is not competible with the docker base image
`scratch`.

Follows the current step, the arm64 docker image will be built after
Github release.
2024-11-11 18:44:35 +00:00
simonsan
a56f671b02
ci: remove extra-feature from cross-ci
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-11 01:01:37 +01:00
simonsan
65b8f68dd8
ci(build): add platform-dependent settings and remove ci flag for extra features
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 23:09:24 +01:00
simonsan
f774d8ba63
ci(workflows): add FIXME comments for mount compatibility and dependency installation
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 22:18:10 +01:00
simonsan
0a94b02868
ci(build): remove 'mount' feature from unsupported platforms
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 22:15:03 +01:00
aawsome
bb107be102
feat(commands): Add mount command (#973)
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/fuser

closes #971

---------

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 20:49:44 +00:00
simonsan
bab3ec6bf6
ci(build): add extra feature to build matrix
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 21:24:32 +01:00
simonsan
ebff5ef27e
ci(build): add default feature deps
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 20:42:04 +01:00
simonsan
9ddeb25180
ci(build): more dependency targets
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 20:21:35 +01:00
simonsan
59eae0db65
ci: explicitly set extra-features in nightly workflow
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 20:12:46 +01:00
simonsan
36701ed578
ci: first try to install build dependencies in CD/CI
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-11-10 17:49:57 +01:00
Tshepang Mbambo
bf5276aec5
chore: clarify --use-profile command in config by using long form (#1344) 2024-10-31 22:21:03 +00:00
simonsan
d4420c3dce
chore(deps): update core and testing crates (#1340) 2024-10-25 17:12:09 +02:00
rustic-release-plz[bot]
fb7dddaf24
chore: release v0.9.4 (#1322)
## 🤖 New release
* `rustic-rs`: 0.9.3 -> 0.9.4 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.9.4](https://github.com/rustic-rs/rustic/compare/v0.9.3...v0.9.4)
- 2024-10-24

### Added

- *(commands)* Add tar output to dump command
([#1328](https://github.com/rustic-rs/rustic/pull/1328))

### Fixed

- clippy lints for new Rust version
([#1329](https://github.com/rustic-rs/rustic/pull/1329))
- *(deps)* downgrade self-update to fix problems finding right target
([#1323](https://github.com/rustic-rs/rustic/pull/1323))

### Other

- *(deps)* remove once_cell and replace with std::sync::LazyLock,
increase MSRV to 1.80.0
([#1337](https://github.com/rustic-rs/rustic/pull/1337))
- *(deps)* update tokio, ratatui, and tui-textarea
([#1336](https://github.com/rustic-rs/rustic/pull/1336))
- *(deps)* update rustic_core and rustic_backend
([#1334](https://github.com/rustic-rs/rustic/pull/1334))
- *(deps)* update abscissa framework
([#1330](https://github.com/rustic-rs/rustic/pull/1330))
- introduce a new feature 'release' that includes the 'self-update'
feature ([#1307](https://github.com/rustic-rs/rustic/pull/1307))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
2024-10-24 17:46:20 +00:00
simonsan
2afb5b2132
chore(deps): remove once_cell and replace with std::sync::LazyLock, increase MSRV to 1.80.0 (#1337) 2024-10-24 19:29:49 +02:00
aawsome
dea0221b38
feat(commands): Add tar output to dump command (#1328)
The `dump` command will now produce a tar when called with a directory.

---------

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-24 19:05:00 +02:00
simonsan
a6a135a649
chore(deps): update tokio, ratatui, and tui-textarea (#1336)
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
2024-10-24 19:01:46 +02:00
simonsan
11885c190a
chore(deps): update rustic_core and rustic_backend (#1334)
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>
2024-10-24 18:43:18 +02:00
renovate[bot]
b43709966f
chore(deps): update actions (#1335)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[MarcoIeni/release-plz-action](https://redirect.github.com/MarcoIeni/release-plz-action)
| action | digest | `ede2f28` -> `394e0e4` |
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | digest | `eef6144` -> `11bd719` |

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJBLWNpIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-24 18:28:14 +02:00
simonsan
4ba226a7f3
chore(deps): update abscissa framework (#1330) 2024-10-24 18:21:05 +02:00
aawsome
d52f481be8
fix: clippy lints for new Rust version (#1329)
Fix clippy lints which came from updated Rust version. We now use `Box`
for all commands.
2024-10-20 12:37:03 +00:00
simonsan
8da868591c
chore(release): Disable automatic dependency updates (#1325) 2024-10-16 15:29:19 +02:00
simonsan
24a7ec53fb
fix(deps): downgrade self-update to fix problems finding right target (#1323)
Fixes #1291

Related: https://github.com/jaemk/self_update/issues/136

---------

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-16 11:12:59 +00:00
renovate[bot]
3a1eb29681
chore(deps): update actions (#1324)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[MarcoIeni/release-plz-action](https://redirect.github.com/MarcoIeni/release-plz-action)
| action | digest | `693f6d4` -> `ede2f28` |
| [Swatinem/rust-cache](https://redirect.github.com/Swatinem/rust-cache)
| action | digest | `23bce25` -> `82a92a6` |
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | digest | `692973e` -> `eef6144` |

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJBLWNpIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-14 23:50:18 +00:00
simonsan
a635073ba4
build: introduce a new feature 'release' that includes the 'self-update' feature (#1307)
This is intended to be used in our CI/CD pipelines, so we don't need to
add 'self-update' feature manually, as that is error-prone.

---------

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-11 17:16:13 +00:00
rustic-release-plz[bot]
9c1239e0c7
chore: release v0.9.3 (#1312)
## 🤖 New release
* `rustic-rs`: 0.9.2 -> 0.9.3 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.9.3](https://github.com/rustic-rs/rustic/compare/v0.9.2...v0.9.3)
- 2024-10-10

### Fixed

- *(deps)* update rustic_core to version 0.5.3
([#1314](https://github.com/rustic-rs/rustic/pull/1314))

### Other

- add status badge for docker image build and shorten workflow name
([#1311](https://github.com/rustic-rs/rustic/pull/1311))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
2024-10-10 04:29:04 +02:00
simonsan
facfb2d20e
fix(deps): update rustic_core to version 0.5.3 (#1314)
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>
2024-10-10 04:11:20 +02:00
simonsan
967deaeee6
docs: add status badge for docker image build and shorten workflow name (#1311)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-09 20:06:17 +02:00
rustic-release-plz[bot]
fe07c41f1e
chore: release v0.9.2 (#1294)
## 🤖 New release
* `rustic-rs`: 0.9.1 -> 0.9.2 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.9.2](https://github.com/rustic-rs/rustic/compare/v0.9.1...v0.9.2)
- 2024-10-09

### Added

- *(config)* Add hooks
([#1218](https://github.com/rustic-rs/rustic/pull/1218))

### Other

- *(deps)* update rustic_core
([#1309](https://github.com/rustic-rs/rustic/pull/1309))
- build and publish docker image on release
([#1297](https://github.com/rustic-rs/rustic/pull/1297))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
2024-10-09 17:01:52 +00:00
simonsan
64e1ebb5ba
chore(deps): update rustic_core (#1309)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-09 18:43:47 +02:00
simonsan
41985e34e0
chore: add Zlib to allowed licenses in deny.toml (#1308)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-09 18:14:00 +02:00
simonsan
be332d5a0b
chore: update dprint config (#1306)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>

---------

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-08 16:16:24 +02:00
renovate[bot]
e29625b9e3
chore(deps): update actions (#1299)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[MarcoIeni/release-plz-action](https://redirect.github.com/MarcoIeni/release-plz-action)
| action | digest | `9135692` -> `693f6d4` |
|
[docker/build-push-action](https://redirect.github.com/docker/build-push-action)
| action | pinDigest | -> `4f58ea7` |
| [docker/login-action](https://redirect.github.com/docker/login-action)
| action | pinDigest | -> `9780b0c` |
|
[docker/setup-buildx-action](https://redirect.github.com/docker/setup-buildx-action)
| action | pinDigest | -> `c47758b` |

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (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:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiQS1jaSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-07 01:16:44 +00:00
mueckinger
a580952b55
build: build and publish docker image on release (#1297)
Hi! Finally I figured out how to automatically build docker images on
every new rustic release.
Closes  #1083
Completes tasks discussed in #969, #1008 and #1010.

Notes to the maintainers:
- This requires setting Workflow permissions to write access for the
GITHUB_TOKEN as described here:
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-default-github_token-permissions
- It makes sense to update the README (added docker install info) in the
next rustic release (when the first image is built)
2024-10-05 14:27:24 +00:00
aawsome
cb3903b9dc
feat(config): Add hooks (#1218)
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>
2024-10-05 01:58:55 +00:00
simonsan
7aff9dc191
ci: add missing feature self-update to tests and checks (#1293)
Currently, we are not testing with all features, as `self-update` is
missing. This PR adds it back.

---------

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-05 02:02:26 +02:00
rustic-release-plz[bot]
62d78ebc8e
chore: release v0.9.1 (#1283)
## 🤖 New release
* `rustic-rs`: 0.9.0 -> 0.9.1 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.9.1](https://github.com/rustic-rs/rustic/compare/v0.9.0...v0.9.1)
- 2024-10-03

### Added

- *(config)* add more filters
([#1263](https://github.com/rustic-rs/rustic/pull/1263))
- *(check)* Allow to only check trees+packs for given snapshots
([#1230](https://github.com/rustic-rs/rustic/pull/1230))
- *(commands)* add a `docs` command to easily access the user, dev and
config documentation
([#1276](https://github.com/rustic-rs/rustic/pull/1276))

### Fixed

- *(docs/cli)* improve the descriptions of the CLI commands
([#1277](https://github.com/rustic-rs/rustic/pull/1277))
- *(deps)* update rustic_core and other dependencies and fix merge
precedence ([#1282](https://github.com/rustic-rs/rustic/pull/1282))
- *(docs)* update configuration documentation to align with recent
changes ([#1280](https://github.com/rustic-rs/rustic/pull/1280))

### Other

- *(deps)* upgrade dependencies
([#1289](https://github.com/rustic-rs/rustic/pull/1289))
- add triage label to new issues only if no label has been set when
creating it ([#1287](https://github.com/rustic-rs/rustic/pull/1287))
- *(interactive)* use update methods for refreshing snapshots
([#1285](https://github.com/rustic-rs/rustic/pull/1285))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
2024-10-03 17:42:19 +00:00
simonsan
b384852679
chore(deps): upgrade dependencies (#1289)
- rustic_core to 0.5.1
- rustic_backend to 0.4.1
- open to 5.3.0

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-03 19:23:40 +02:00
simonsan
974727b7ed
ci: add triage label to new issues only if no label has been set when creating it (#1287)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-10-03 14:19:54 +02:00
aawsome
cc4f016dab
feat(config): add more filters (#1263)
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>
2024-10-02 22:57:21 +00:00
aawsome
68cbca3ee4
perf(interactive): use update methods for refreshing snapshots (#1285)
This increases speed of refreshing a lot.
2024-10-02 21:30:54 +00:00