I agree! What about aawsome-server and aawsome-backup
I don’t see a problem with the new name - just document it as you wrote here. It’d be nice to see new stuff there, like compression, which has been “in the works” for eight years or so…
I also thought about the name and decided to let it as it is. The official name is actually “rustic-rs” which is also the crate name. I think that in the future the code will be separated in a library crate which provides all the functionality and a binary crate providing one ore more small binaries.
At the moment I’m trying to convert the logic to async Rust. That will be the next step in order to use async http client libraries and will allow to implement more backends.
About new features: Let me take to opportunity to advertise some of the existing new features. The backup
command is already fully working:
alex@debian:~$ ./rustic-rs backup --help
rustic-rs-backup
backup to the repository
USAGE:
rustic-rs --repository <REPOSITORY> backup [OPTIONS] <SOURCE>
ARGS:
<SOURCE> backup source
OPTIONS:
--exclude-if-present <FILE> Exclude contents of directories containing filename (can be
specified multiple times)
-f, --force Use no parent, read all files
-g, --glob <GLOB> Glob pattern to include/exclue (can be specified multiple
times)
--git-ignore Ignore files based on .gitignore files
--glob-file <FILE> Read glob patterns to exclude/include from a file (can be
specified multiple times)
-h, --help Print help information
--iglob <GLOB> Same as --glob pattern but ignores the casing of filenames
--iglob-file <FILE> Same as --glob-file ignores the casing of filenames in
patterns
-n, --dry-run Do not upload or write any data, just show what would be done
--parent <SNAPSHOT> Snapshot to use as parent
--with-atime Save access time for files and directories
-x, --one-file-system Exclude other file systems, don't cross filesystem boundaries
and subvolumes
Note the *glob*
options which allow include/exclude patterns and the --git-ignore
option.
Also as a small improvement the number of nodes and total (restore) size of a snapshot is saved in the snapshots:
alex@debian:~$ ./rustic-rs -r /path/to/repo -p /path/to/key snapshots
ID | Time | Host | Tags | Paths | Nodes | Size
----------+---------------------+--------+------+-------------------------+-------+-----------
a4c05cdd | 2022-03-06 23:31:16 | debian | | /home2 | ? | ?
760a8508 | 2022-03-06 23:40:22 | debian | | /home2 | 232 | 276.9 MiB
The first snapshot was made by restic, the second by rustic (using the first as parent).
Of course it is much more easy to build a second implementation and early add some features there when there is always the reference implementation at hand.
But I hope we can use this second implementation to get benefits in both directions.
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.