[Borgbackup] Can I use the not-overwritten part of a dd-overwritten borg backup?

Thomas Waldmann tw at waldmann-edv.de
Sun Nov 1 16:40:09 EST 2020


> There's an external hard drive where I back up lots of stuff using borg. 
 > It was around 54 GB last I checked.

You mean you have (or had) a filesystem on that HDD with a borg repository?

> I accidentally overwrote the first chunk of that drive with NixOS 20.09
 > using dd.

Not sure what you mean by "chunk" in that context.

Did you write a NixOS ISO image to the HDD block device, so that you 
lost the first hundreds or thousands of MBs of the filesystem structure?

> Most of the files I don't 
> mind losing but a few are really important.

If you can recover a part of the borg repo, "borg check --repair" might 
be able to recover some stuff or not, that depends on what and how much 
is intact. Only try "borg check --repair" on a COPY of the repo, the 
warning it tells you is there for a reason.

But before you can do that, you need to recover the borg repo files from 
the damaged file system, which is out of scope of borg support, but 
generic "i damaged my filesystem / i have a half broken hard disk" file 
recovery.

Also, you still need to have the borg (encryption) key and the 
corresponding passphrase. See the docs about where the key is stored 
(also, borg has told you to make a backup of the key, you can also use 
that).

-- 

GPG ID: 9F88FB52FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393


More information about the Borgbackup mailing list