Commit Graph

30 Commits

Author SHA1 Message Date
Dubzer
3a3b5b187e
feat: OpenTelemetry Protocol support for metrics (#1473)
fixes: #1458

---------
Co-authored-by: aawsome <37850842+aawsome@users.noreply.github.com>
2025-06-29 22:47:13 +02:00
Alexander Weiss
b77819f6a5 clippy lints 2025-06-27 22:49:31 +02:00
aawsome
0ff0e7caa9
feat(interactive)!: Add interactive diff / overwork diff output (#1480)
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.
2025-06-26 16:17:11 +02:00
aawsome
2ec2644a93
Use rustic_core development version (#1476) 2025-06-11 22:46:38 +02:00
aawsome
2d4e0990ee
feat(commands)!: Extend logging (#1463)
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 #1454
closes #1080
2025-05-21 06:03:38 +00:00
aawsome
e3a032287e
use 2024 edition (#1453) 2025-04-26 09:02:10 +02:00
Léo Gaspard
47a4bb5d29
feat: push prometheus metrics to pushgateway on-demand (#1404)
Fixes #1403

---------

Co-authored-by: Alexander Weiss <alex@weissfam.de>
2025-03-04 10:33:49 +01:00
aawsome
8b18e62e78
feat(commands): More dump options (#1339)
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>
2024-12-02 23:58:43 +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
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
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
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
86fa8551f4
fix(config)!: use multiple options only as array in config profile (#1240)
Consistently uses singular and plural names for options in config and
CLI

BREAKING CHANGE: This requires to adapt CLI calls and config keys.

Affected options:
- `glob` -> `globs` in config profile
- `iglob` -> `iglobs` in config profile
- `glob`-file -> `glob-files` in config profile
- `iglob-file` -> `iglob-files` in config profile
- `custom-ignore-file` -> `custom-ignore-files` in config profile
- `tag`-> `tags` in config profile
- `keep-tags` -> now only array
- `keep-ids` -> now only array
- `use-profile`-> `use-profiles` in config profile
- `backup.sources` -> `backup.snapshots` in config profile
- `filter-host` -> `filter-hosts` in config profile
- `filter-label` -> `filter-labels` in config profile

---------

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-09-23 15:04:45 +00:00
aawsome
959c0576bc
feat(commands): backup: Add option --long (#1159)
closes #1156

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-09-18 19:04:55 +00:00
aawsome
152c256bcf
prepare release 0.8.1 (#1231)
Co-authored-by: github-actions <github-actions@github.com>
2024-09-08 21:28:13 +02:00
aawsome
78189895f3
prepare release 0.8.0 (#1202)
Co-authored-by: github-actions <github-actions@github.com>
2024-08-22 08:37:30 +02:00
aawsome
5423186657
chore: update rustic_core and rustic_backend (#1201) 2024-08-20 19:59:10 +00:00
aawsome
58ed4b3655
feat!: Allow specifying many options in config profile without array (#1130)
Breaking change:
`password-command` and `warmup-command` now must be given as array if
the commands use args.
2024-04-22 15:03:39 +02:00
aawsome
9980a36b7d
fix(config)!: multiple paths in config profile as array (#1124)
-- 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 #1122
closes #1094
2024-04-18 16:03:39 +02:00
aawsome
00c4f197d7
feat(commands): Add --check-index option (#1078)
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.
2024-04-15 10:53:05 +02:00
aawsome
88b21a85ad
feat(commands)!: show-config now outputs toml (#1095)
`show-config` now outputs toml.

see #1093

---------

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-04-10 06:55:01 +02:00
simonsan
a642f134ed
test: refactor integration tests to assert_cmd and predicates, test all configs in config subdirectory (#1060)
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>
2024-02-29 20:04:19 +00:00
simonsan
3f6afaf130
tests: replace missing crates folder with src
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-02-05 00:35:39 +01:00
github-actions[bot]
f06574be01
release: rustic-rs v0.7.0 (#1035)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: Alexander Weiss <alex@weissfam.de>
2024-02-03 21:22:28 +00:00
simonsan
0c7da212df
tests: add test to parse all config files
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-02-03 10:16:30 +01:00
github-actions[bot]
4a785fb411
release: rustic-rs v0.6.0 (#896)
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: Alexander Weiss <alex@weissfam.de>
Co-authored-by: aawsome <37850842+aawsome@users.noreply.github.com>
2023-10-23 13:00:56 +00:00
Alexander Weiss
61314c219e Move init command to rustic_core 2023-07-07 07:02:10 +02:00
Alexander Weiss
a71d0b2e49 move getting snapshots to rustic_core 2023-06-24 07:34:51 +02:00
simonsan
b698cc57fc Refactor to library and cli application part
Co-authored-by: Alexander Weiss <alex@weissfam.de>
2023-06-06 08:51:43 +02:00