This could cause confusion: There is already a rustic which is a restic wrapper written in rust.
Here is an update of what changed in rustic.
Actually I’m about to prepare a 0.2 release which features:
- added the following commands:
forget
,prune
,repoinfo
,tag
,key
- forgetting and pruning is lock-free, i.e. you can prune your repository and concurrently backup to it
- added the REST backend (others backends are possible by rclone and starting
rclone serve restic
manually) - snapshots save much more statistical information, see my last comment in Print out the backup size when listing snapshots (enhancement) · Issue #693 · restic/restic · GitHub
- (command
init
is WIP - 0.2 will include it)
Happy to get feedback in form of bug reports, feature requests or PRs on the github page!
I made a pre-release 0.2.0rc1 which contains the following changes:
- new commands: init, forget, prune, repoinfo, tag, key
- allow parallel lock-free repo access including prune
- added REST backend
- add compression support
- most operations are now parallelized (using async rust)
- added more statistical information to snapshots
- now uses the same JSON format for trees/nodes as restic
- better progress bars
- various small fixes
I’m looking for beta testers! A binary for linux is available at the link above, but you can of course also simply compile it yourself.
I just released rustic 0.2.0.
Binaries will follow soon.
If you have any comments or questions about rustic, feel free to join the discussions on github. I’m especially interested in which features you think should be implemented next.
rustic 0.2.1 has just been released
rustic 0.2.2 has just been released
Some new features to mention:
- rustic now supports rclone and via rclone all remote storages which are supported by rclone
- rustic now supports cold storages (see e.g. Backup to AWS S3 Glacier) if an additional “hot repo” is specified
- rustic now allows to specify or change some parameters in the config file via the
init
or the newconfig
command - rustic now allows to customize pack sizes (see e.g. Control the minimal pack files size)
Help is needed to improve rustic further; you can help by
- testing rustic and reporting bugs
- asking questions in the discussions
- opening issues for feature requests or bugs
- contributing via pull requests
rustic 0.3.0 has just been released
Changes worth to note are:
- rustic should be now fully compatible with restic. This means repos generated by (recent) restic can be used by rustic and vice-versa
- rustic no longer uses temporary files but stores in-progress packfiles in-memory
-
restore
checks present files and skip them during restore if they are valid; this makesrestore
resumeable - option
restore --delete
to delete files not in snapshot from restore destination
If you want to know more or have a question, join the rustic discussions!
Does this include compressed repos with version 2?
Yes, support for compressed repos with version 2 was introduced with rustic 0.2.0.
Actually version 2 is the standard when creating a repo with rustic. You have to use rustic-rs init --set-version 1
if you want a version repo.
rustic 0.3.1 has just been released.
Some new features which are worth mentioning:
- rustic now uses the binary name
rustic
- rustic now supports client configuration in config files, see rustic/examples at main · rustic-rs/rustic · GitHub
-
rustic snapshots
now summarizes identical snapshots in one line in the output -
rustic backup
now supports much more options which are known by restic
For more information or discussions about rustic’s features, please visit
Out of curiosity, have you compared between Restic and Rustic performance?
I do not find rustic-rs in the Arch-User-Repository (AUR), but there is other old rustic as restic wrapper.
I did some comparisons with my repositories with the result that rustic generally uses less resources (memory, CPU time) than restic. Note that, however, rustic is not yet fully parallelized, so some operations which highly benefit from parallelization perform faster on restic if you have some CPU cores at hand.
Feel free to do your own tests or a qualified comparison and report at the rustic discussions or issues.
Note that rustic compiles to a single binary with no or only standard dynamic library dependencies. You can either use a pre-compiled version (see the rustic github page) or compile it yourself by doing:
- install rust (https://rustup.rs/)
- download or
git clone
the source code - run
cargo build -r
rustic 0.3.2 has been released.
Some features worth mentioning:
- the logging has been completely overworked and now supports log levels and logging to a log file
- the
restore
command with log-leveldebug
now allows to exactly see differences between a snapshot and your local files (note that a--dry-run
is also present).
For more information or discussions about rustic’s features, please visit
How many lines of code are rustic and restic? And how long did they take you guys to write that code?
Restic is very popular and has many developers on GitHub, around 300. I don’t know to what extent they are involved, but the numbers are large. For rustic I imagine this is far fewer, seems to be 7 people, so you have to mostly write the code?
@Eli6 I have already answered the lines of code question here. Currently, rustic is at about 8.500 lines of code.
About contributors, see
and
TL;DR: restic has 2-4 core developers, rustic so far only me. BTW: I’m looking forward to getting more people involved in rustic
Interesting that you got to implement it in about 10% of the Go code. I thought Rust is lower level and should take more code than Go for the same functionality.
In my experience the opposite is the case: Rust allows a much higher level of abstraction than Go does. This results in shorter and “cleaner” code. A good example is the error handling, which in Go is something like:
x, err := a.func()
if err != nil {
return err
}
y, err := x.func2()
if err != nil {
return err
}
while in Rust it reads:
let y = a.func()?.func2()?;
I’m happy to announce rustic 0.4.0
New features worth mentioning are:
-
backup
option--as-path
allows to overwrite the path which is saved in a snapshot - Snapshots are extended by label, a description and “created by program”
- labels allow to group snapshots (and to define parent snapshots for
backup
) additional to hosts and paths -
diff
now allows to compare dirs in snapshots with local dirs - New command
repair
.rustic repair index
is basically the equivalent torestic rebuild-index
wherasrustic repair snapshots
does what you can only do with restic by compiling Add repair command by aawsome · Pull Request #2876 · restic/restic · GitHub. Note that rustic binaries are available if you need that command to repair a restic repo.
For more information or questions/discussions about this rustic release, please visit rustic 0.4.0 · Discussion #306 · rustic-rs/rustic · GitHub
I’m happy to announce rustic 0.4.2.
Changes worth mentioning are:
- bugs w.r.t. rclone versions are fixed as well as other bugs.
- The command
copy
has been added. It only works when defining the target repo(s) in the config file in order to not getting confused by--repo2
or--target-repo
options. - restore to a dir with already existing files is much faster as it allows to only check modification time and file size. To be sure, the option
--verify-existing
is available to read and verify existing file contents - The syntax
<SNAPSHOT>:<PATH>
now also works with files. For example, it is now possible to restore a single file viarustic restore a4f3:/path/to/file /path/to/destination/
- diffing with local dirs now by default reads the files to check the contents. This allows for example to do
rustic diff a4f3:/path /local/path
and all files in/local/path
are read and checked if they are identical to the files under/path
in the given snapshot.
For more infos or questions, please visit rustic 0.4.2 · Discussion #366 · rustic-rs/rustic · GitHub
Nice you compile it yourself.