rustic - fast, encrypted, and deduplicated backups powered by Rust
Go to file
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
.cargo chore(deps): update embarkstudios/cargo-deny-action action to v2 (#1259) 2024-09-25 14:26:51 +00:00
.github ci(build): add extra feature to build matrix 2024-11-10 21:24:32 +01:00
config feat(commands): Add mount command (#973) 2024-11-10 20:49:44 +00:00
coverage Refactor to library and cli application part 2023-06-06 08:51:43 +02:00
docs chore: remove docs/screenshots directory as that has been moved to the assets repository 2023-09-12 02:20:22 +02:00
scripts Refactor to library and cli application part 2023-06-06 08:51:43 +02:00
src feat(commands): Add mount command (#973) 2024-11-10 20:49:44 +00:00
tests 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
util/systemd Systemd timers for backup and forget 2023-07-08 09:05:45 +02:00
.gitignore feat(config): Add hooks (#1218) 2024-10-05 01:58:55 +00:00
build-dependencies.just ci(build): add default feature deps 2024-11-10 20:42:04 +01:00
build.sh build.sh: Add optional parameters 2022-11-30 13:31:34 +01:00
Cargo.lock feat(commands): Add mount command (#973) 2024-11-10 20:49:44 +00:00
Cargo.toml feat(commands): Add mount command (#973) 2024-11-10 20:49:44 +00:00
CHANGELOG.md chore: release v0.9.4 (#1322) 2024-10-24 17:46:20 +00:00
cliff.toml release: rustic-rs v0.6.0 (#896) 2023-10-23 13:00:56 +00:00
CONTRIBUTING.md docs: Update Readme layout, move docs to separate repository, add rustic_core Readme.md (#820) 2023-09-11 05:13:18 +02:00
deny.toml feat(commands): Add mount command (#973) 2024-11-10 20:49:44 +00:00
Dockerfile build: build and publish docker image on release (#1297) 2024-10-05 14:27:24 +00:00
dprint.json chore: update dprint config (#1306) 2024-10-08 16:16:24 +02:00
ECOSYSTEM.md chore: move rustic_testing into rustic_core 2024-02-04 23:00:11 +01:00
LICENSE-APACHE Refactor to library and cli application part 2023-06-06 08:51:43 +02:00
LICENSE-MIT Refactor to library and cli application part 2023-06-06 08:51:43 +02:00
maskfile.md fix: maskfile 2023-09-14 01:47:17 +02:00
README.md 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
release-plz.toml chore(release): Disable automatic dependency updates (#1325) 2024-10-16 15:29:19 +02:00

fast, encrypted, and deduplicated backups

About

rustic is a backup tool that provides fast, encrypted, deduplicated backups.

It reads and writes the restic repo format described in the design document and can be used as a restic replacement in most cases.

It is implemented in Rust, a performant, memory-efficient, and reliable cross-platform systems programming language.

Hence rustic supports all major operating systems (Linux, MacOs, *BSD), with Windows support still being experimental.

Stability

rustic currently is in beta state and misses regression tests. It is not recommended to use it for production backups, yet.

rustic Libraries

The rustic project is split into multiple crates:

Features

  • Backup data is deduplicated and encrypted.
  • Backup storage can be local or cloud storages, including cold storages.
  • Allows multiple clients to concurrently access a backup repository using lock-free operations.
  • Backups by default are append-only on the repository.
  • The operations are robustly designed and can be safely aborted and efficiently resumed.
  • Snapshot organization is possible by hostname, backup paths, label and tags. Also a rich set of metadata is saved with each snapshot.
  • Retention policies and cleaning of old backups can be highly customized.
  • Follow-up backups only process changed files, but still create a complete backup snapshot.
  • In-place restore only modifies files which are changed.
  • Uses config files for easy configuration of all every-day commands, see example config files.

Contact

You can ask questions in the Discussions or have a look at the FAQ.

Contact Where?
Issue Tracker GitHub Issues
Discord Discord
Discussions GitHub Discussions

Getting started

Please check our documentation for more information on how to get started.

Installation

From binaries

cargo-binstall

cargo binstall rustic-rs

Windows

Scoop
scoop install rustic

Or you can check out the releases.

Nightly binaries are available here.

Docker

docker pull ghcr.io/rustic-rs/rustic

From source

Beware: This installs the latest development version, which might be unstable.

cargo install --git https://github.com/rustic-rs/rustic.git rustic-rs

crates.io

cargo install --locked rustic-rs

Differences to restic?

We have collected some improvements of rustic over restic here.

Contributing

Tried rustic and not satisfied? Don't just walk away! You can help:

Do you know how to code or got an idea for an improvement? Don't keep it to yourself!

Please make sure, that you read the contribution guide.

Minimum Rust version policy

This crate's minimum supported rustc version is 1.80.0.

The current policy is that the minimum Rust version required to use this crate can be increased in minor version updates. For example, if crate 1.0 requires Rust 1.20.0, then crate 1.0.z for all values of z will also require Rust 1.20.0 or newer. However, crate 1.y for y > 0 may require a newer minimum version of Rust.

In general, this crate will be conservative with respect to the minimum supported version of Rust.

License

Licensed under either of:

at your option.