Rustic doesn't check if repo is already initialized #1140
-
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 :) Anyway, it did what it did. At first I couldn't access the repo at all. I then tried to restore the config file from the cold repo and copied it over to the hot repo. When I then tried to access the repo I got this error message:
I deleted the second key (generated by the second init command) and got this:
Which is more or less expected since I used the config from the repo-cold bucket :( My question now is, how can I repair this? Can I regenerate a new hot config? Can I somehow just switch the flag in the config file from cold to hot and then it will work? How? Or am I lost here and I need to start from scratch? Thanks a lot :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I transferred the part of re-initializing an existing repository to its own issue, that you can subscribe to here: #1141 |
Beta Was this translation helpful? Give feedback.
-
@jfreax To overwrite an existing repository config should actually not be possible. We'll have to investigate this. Most likely you found a bug. Thanks for reporting!
Yes, using the cold repo and adding the "hot repo" flag in the config is what should work. I have to look if you can already do this with a recent rustic version. Full repair support should be available once #324 has been tackled. |
Beta Was this translation helpful? Give feedback.
@jfreax To overwrite an existing repository config should actually not be possible. We'll have to investigate this. Most likely you found a bug. Thanks for reporting!
Yes, using the cold repo and adding the "hot repo" flag in the config is what should work. I have to look if you can already do this with a recent rustic version. Full repair support should be available once #324 has been tackled.