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
}
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 to restic rebuild-index wheras rustic 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.
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 via rustic 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.
Today, I’m announcing rustic 0.4.4. I am very proud that rustic in meanwhile got more than 300 stars in github - thanks for you all giving me motivation by this!
diff and restore now handle single file targets correctly, i.e. you can do rustic diff <snap>:/path/to/file localfile or rustic restore <snap>:/path/to/file /my/other/filename.
warm-up options are now part of the repo configuration and can also be configured in the config file
I just wanted to announce that rustic now experimentally supports Windows. As I don’t have a Windows system at hand Iwould like to invite everyone able to use the beta version to test it and report what’s missing.
I hoped rustic would be more compatible on the command line (options) - to avoid learning everything again (might have been also beneficial for project to get more testers “quicker”). But I also noticed that I am not able to open the rustic backup folder with “Restic-Browser”. So I guess rustic is not really a restic client (anymore)? Or I misunderstood, I guess.
It is not 100%, but very close. There are some options which have a slightly different name (like the --filter-* options where I found the restic name not a perfect choice) and of course there exists features in rustic which do not exist in restic and vice versa.
If you are referring to the -r local: option, this is only a workaround until repository paths starting with a drive letter are fixed on windows.
I am perfectly able to open and read all repositories created by rustic with Restic-Browser - under Linux. Maybe you encountered a Windows compatibility issue? Windows support of rustic is experimental and might be buggy. Please open an issue or discussion on the rustic project site with the exact error. Thanks a lot!
I’m happy to announce rustic 0.5.0.
This version adds many new features, here are some of the most interesting ones:
Experimental windows support has been added
New command merge allows to merge snapshots.
New option --filter-fn allows custom snapshot filter using the Rhai script language. You can use for example rustic snapshots --filter-fn '|sn| sn.host in ["host1", "host2"] && (sn.time > "2020-02-01T12:30' || sn.tags == ["only_this_tag"]). Note that this option is also available for the tag, forget, copy and merge command.
command dump and extended file attribute support is now also available.
This is again a small bugfix release which fixes some minor bugs.
Moreover, the copy command now also allows to initialize target repositories (using the correct chunker parameters)
FYI: The next step in rustic development will be splitting it into a library and CLI part, which is already under development and will be available in the next release.