Command line API compared to restic #609
-
Hi, great work, I'm really happy to see restic ported to rust! I'm the author of crestic, a configuration wrapper for restic, and I'm interested in adding support for rustic. My question is: how does the command line API of rustic compare to restic? Are they drop in replaceable? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
The CLI options are similar to restic, but not 100% compatible. Some options have different names (e.g. However, I fear that a wrapper like crestic is not needed for rustic as it already has built-in config file support.
allows you to call |
Beta Was this translation helpful? Give feedback.
-
crestic can actually do more than just load a profile: split profile names |
Beta Was this translation helpful? Give feedback.
-
@nils-werner Thanks for the hint! With rustic you can do similar things by splitting your storage config and source config in multiple config files and then using both, e.g.
and then run That said, I'd like to absolutely encourage you to add rustic to crestic if you think the crestic users would benefit from it. |
Beta Was this translation helpful? Give feedback.
-
Ah that's neat, too! As a matter of fact, crestic can already talk to rustic, because it's simply setting command line options, and doesn't care what option names are. All you have to do is set the I was just asking about the option names to see if the same identical config files could be used for both restic and rustic. |
Beta Was this translation helpful? Give feedback.
-
@nils-werner Would be neat, if you could collect features from your We could also work together on writing migration guides e.g. |
Beta Was this translation helpful? Give feedback.
-
I think that these three options would read like this in TOML: [home.backup]
key = "value"
empty = ""
flag = true And, specifically withing a rustic configuration you would call [[backup.sources]]
source = "/home"
key = "value"
empty = ""
flag = true |
Beta Was this translation helpful? Give feedback.
The CLI options are similar to restic, but not 100% compatible. Some options have different names (e.g.
--host
in restic became--filter-host
in rustic) and there are of course many additional options in rustic.However, I fear that a wrapper like crestic is not needed for rustic as it already has built-in config file support.
Using a config file like
myprofile.toml
:allows you to call
rustic -P myprofile backup
and it will do the job. See theexamples
dir for more sophisticated config files.