Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document difference in CLI options rustic vs. restic (was: rustic does not support restic's -H for --host) #6

Open
ibotty opened this issue Mar 27, 2023 · 9 comments

Comments

@ibotty
Copy link

ibotty commented Mar 27, 2023

No description provided.

@aawsome
Copy link
Member

aawsome commented Mar 27, 2023

There is no --host option in rustic, but the same functionality is available as --filter-host.

Also, there is no -H shortcut for --filter-host as filter-host is also available in the forget commands as well as -H - which stands for --keep-hourly. So in order to avoid any confusion, I didn't add a shortcut for --filter-host.

Note that you can define global snapshot filters in the config file, e.g.

[snapshot-filter] 
filter-host = "myhost"

If you like, I can also add support for env variables to filter snapshots...

@ibotty
Copy link
Author

ibotty commented Mar 27, 2023

Maybe we are speaking past each other. I am referring to the following flag.

> restic backup -h
[...]
  -H, --host hostname                          set the hostname for the snapshot manually. To prevent an expensive rescan use the "parent" flag

I have assumed it corresponds to rustic's

        --host <NAME>                  Set the host name manually

@ibotty
Copy link
Author

ibotty commented Mar 27, 2023

And btw: Thank you for your awesome support.

@aawsome
Copy link
Member

aawsome commented Mar 27, 2023

Ah, sorry. Didn't realize there is another -H for the backup command. Hope you see why I was hesitating to add a shortcut which is used in very different ways...

You are right, --host is what you are looking for.

@ibotty
Copy link
Author

ibotty commented Mar 27, 2023

I can tell that restic's UI is confusing. Is flag-to-flag compatibility not a goal? If not, I'll propose a PR with some documentation regarding incompatible flags.

@aawsome
Copy link
Member

aawsome commented Mar 27, 2023

Is flag-to-flag compatibility not a goal?

No, acutally the goal is to stay repository-compatible. This means a restic repo should be always processable by rustic and vice versa. I like people being able to switch software at any time because having choice of the software increases the reliability to work with the data and this IMO is important for a backup software.

If not, I'll propose a PR with some documentation regarding incompatible flags.

That would be awsome! There is actually rustic-rs/rustic#302 open but so far I got too much "distracted" with improving the rustic codebase...

@deajan
Copy link

deajan commented Mar 27, 2023

As far as i analyze the situation, there's no goal for command-line compatibility.
Eg restic init --repository-version 2 --compression auto becomes rustic init --set-version 2 --set-compression 3

@ibotty I'd be interested in a flag match table.

@ibotty
Copy link
Author

ibotty commented Mar 27, 2023

I'll see whether I can write some script that compares the flags and submit a small document. The documentation issue is too big for me to handle atm. I usually also prefer writing code to documentation 🙃.

@aawsome
Copy link
Member

aawsome commented Mar 27, 2023

@ibotty By pointing to the docu I actually just thought that your comparison would very much fit into it. But we can start with having it documented and once there is more docu try to put it in the right structure.

restic init --repository-version 2 --compression auto becomes rustic init --set-version 2 --set-compression 3

Nitpicking: It actually becomes rustic init as version 2 is standard and the zstd default compression level is used by default. (But I have to admit I don't know if this equals the auto compression of restic. AFAIK the levels from the go implementation differ from the facebook standard implementation used by rustic)

@aawsome aawsome changed the title rustic does not support restic's -H for --host Document difference in CLI options rustic vs. restic (was: rustic does not support restic's -H for --host) Mar 28, 2023
@simonsan simonsan transferred this issue from rustic-rs/rustic Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants