-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Borg: Not a Valid Repository: Files Missing (e.g., Config, Hints, Index) (retry) #6865
Comments
So, did you use borg encryption for that repo? If so, do you still have (a backup of) the key? The unhexlify traceback means that the repo id in the config does not have the correct length (256 bit == 64 hex digits). |
Sorry, forgot to answer that: I didn't use Borg encryption. I should clarify: the other issue tells me to put this in the config file:
So that's literally, exactly what I put. The last line invites user input, so I changed it to id = 00001. Later, I realized that the first line was probably supposed to be something other than [repository], but I wasn't sure exactly what. In this case, the name of the repository is BorgRepository, so maybe I should have used either BorgRepository or [BorgRepository] - but the machine isn't available right now, so I can't test it. |
The id is not an arbitrary string, but it must be exactly 64 hex digits. Have a look at a valid config file you can get by just running The first line is a constant, not a repository name. |
And you're lucky you did not use repokey encryption - if you lose the config with the encryption key, you can not recover anything inside this repo (that's the reason why |
I looked at the I copied one of those Unfortunately, that operation generated many errors indicating "New missing file chunk detected" and "Replacing with all-zero chunk." It generated ten new files at the end of the set, mostly full-sized (i.e., ~500 GiB), with names (i.e., numbers) that would conflict with files at the start of the next archive. |
Missing file chunks means that your repo/data/ directory copy was corrupted. Not sure what you mean with your last sentence. |
I was afraid of that. The last sentence was supposed to mean that Archive C originally ended with files with names like 781, 782, and 783, but the I assume it felt free to do that because these files were restored from backup. As far as Borg knew, that was the end of the repository. In reality, however, the next archive in the sequence (Archive D) started with something like 786, 787, 788 ... So now I couldn't restore Archive D's files to the same folder as the files for Archive C. Doing so would overwrite some of these newly added files for Archive C. The actual numbering was not as regular as that, but the problem of filename duplication was there nonetheless. The solution would perhaps be to make sure to restore all archives from backup before attempting But that wouldn't change the apparent fact that the Borg archive was borked. |
The distribution of archive chunks over segment files is not strictly linear, it is not as simple as you think it is. What you should do is start from a full/complete copy of a valid (or "as good as it gets") state of the |
I didn't mean to be commenting on the distribution of archive chunks. I was talking only about the numbered Borg archive files. Viewed in Windows, the numbered filenames conflict, due to the addition of new files at the end of Archive C. Those new files, created by I burned the backup to Blu-ray, one archive at a time. So the BD-R discs contain a folder with the Borg archive files for Archive A (say, 1-229), and then another folder for Archive B (say, 249-523), and so forth. I restored Archives A through C from BD-R, then ran Don't worry, I can make this more confusing if necessary. Just give me time ... |
Can you please read our docs about the terms "archive", "segment files" and "repository"? You seem to use these terms differently and that's quite confusing. |
Guess this is solved? |
hello, my bor.config file is missing but i have the necryption key how to reconstruct it ? |
@NEVARLeVrai you can create a temporary repository of the same type (repokey or keyfile) at some other place and use that config as a template. You can copy the repo id and the key material from your key backup. |
It's okay, I found the config file with recuva it's checking the integrity it's very very slow idk if it will work, I have 700gb of data and it's on an HDD, ANYWAYS thx for helping me |
As advised in the subReddit, I am reposting my issue here, as follows:
I have created a Borg backup in a location like /media/veracrypt1/2022-01-01/BorgRepository. Normally, in that kind of folder, Borg would create files with names like config, hints.1523, index.1523, and integrity.1523, along with a data subfolder containing the Borg archive files, with names like 1523.
When I created a backup of this folder, I neglected to include those top-level files (e.g., hints.1523). Now I have restored that backup. That folder now contains only the data subfolder.
I have tried to inspect the contents of that repository using sudo borg list /media/veracrypt1/2022-01-01/BorgRepository. The result is an error: "/media/veracrypt1/2022-01-01/BorgRepository is not a valid repository."
Is it possible to reconstruct those missing top-level files, so as to make this a working repository?
Advice in response to that post pointed me toward an issue here in GitHub. Following the procedure suggested there, I created a README and a config file at the specified location. Then I ran sudo borg check --repair --progress /media/veracrypt1/2022-01-01/BorgRepository. That produced this output:
This is Ubuntu 22.04 LTS, booted from a USB drive. I've tried rebooting with a different USB; it yields roughly the same result. Both of these have successfully run Borg commands in the past.
The text was updated successfully, but these errors were encountered: