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

Don't re-initialize an already initialized repository without user interaction #1141

Closed
simonsan opened this issue Apr 26, 2024 · 5 comments
Closed
Labels
A-ui-ux Area: Related to user interfaces and user experience C-bug Category: Something isn't working as expected

Comments

@simonsan
Copy link
Contributor

Hi everybody,

I tested out some new rustic configuration (a new profile file) and mistakenly re-init one of my already used repos (copy & paste errors are saying "hi!"). This repo is actually only the hot repo (there is also a cold one, which is not affected).

First thing first: Why is it possible to simply re-init a repo without any warnings? It will create (at least) a new key (the old one was still there in my case (S3)) and overwrites the config file. Some kind of fail-safe for future dump-asses like me would be great :)

Originally posted by @jfreax in #1140

@simonsan simonsan added C-bug Category: Something isn't working as expected A-ui-ux Area: Related to user interfaces and user experience labels Apr 26, 2024
@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Apr 26, 2024
@simonsan simonsan removed the S-triage Status: Waiting for a maintainer to triage this issue/PR label Apr 26, 2024
@aawsome
Copy link
Member

aawsome commented Apr 26, 2024

@jfreax I tried to reproduce this behavior, but rustic always complained that the config file already exists and doesn't initialize the repository.
Can you give steps how I can reproduce this? Thanks a lot!

@jfreax
Copy link

jfreax commented Apr 26, 2024

I wish I could. I'm not 100% sure what I did. What I know is, that my original setup was with a hot and cold repository, but my new tests (which overwrote the config) was only using a "normal" (hot) repo without a cold repo configuration.

I will try to reproduce it.

@jfreax
Copy link

jfreax commented Apr 30, 2024

Unfortunately, I wasn't able to reproduce the behaviour. The config was definitely overwritten. I still have it around. Here are the some facts I still know, it might be helpful to track down what happened:

  • whatever I did resulted in an overwritten config-file and a new secondary key in the keys-directory
  • the new files appeared in the hot repo
  • I originally used a hot+cold setup on S3 (scaleway)
  • the new rustic setup I prepared was a simple (hot) repo
  • I mixed up the repo endpoint/bucket name by copying over my profile file and forgot to edit some things
  • a backup (hot+cold) was running while I did this (not 100% sure about this, but 99%)
    • the backup finished without any problems, restarting it or calling snapshots failed afterwards
  • I also experimented with an rclone backend to reach a swift endpoint at (more or less) the same time
    • but this shouldn't interfere here, because I never configured the S3 endpoint on rclone (not even to this day)

@aawsome
Copy link
Member

aawsome commented Apr 30, 2024

@jfreax I can only imagine that for some reason your backend told there was no config file. But it's hard to guess - and from the code I cannot see where something could go wrong elsewhere...

@aawsome
Copy link
Member

aawsome commented May 28, 2024

closing this as the behavior cannot be reproduced. @jfreax If you encounter the same problem, please don't hesitate to re-open!

@aawsome aawsome closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ui-ux Area: Related to user interfaces and user experience C-bug Category: Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants