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

Bzzzz lazyvirus at gmx.com
Sun Nov 1 16:53:53 EST 2020


On Sun, 1 Nov 2020 15:45:49 -0500
Jeffrey Brown <jeffbrown.the at gmail.com> wrote:

> Hello,

Hi,

> There's an external hard drive where I back up lots of stuff using
> borg. It was around 54 GB last I checked. I accidentally overwrote the
> first chunk of that drive with NixOS 20.09 using dd. Most of the files
> I don't mind losing but a few are really important. (I'll use the
> cloud in the future.)
>
> Is it still possible to extract anything?

Duno, that is ZE question.

> Since I discovered the
> problem (and navigated to the disk in Dolphin, and stared in
> disbelief) the disk has been unplugged and untouched.

Good - first things first, reconnect this HD, do not mount it and make a
dd copy of the partition on another disk on which you will
work/experiment and reconstruct if something goes really bad.

For tools, see about *forensic packages and/or
https://www.system-rescue.org/ (live system CD with lots of tools
integrated, included BB - if you use this one, be aware that the USB
copy has changed, which wasn't reflected in the doc 4 months ago: you
do not need the script anymore to do so, just dd the .iso file to the USB
key).

For text time, consider reading this:
https://www.carbonite.com/blog/article/2016/01/what-is-3-2-1-backup/
and if you don't wanna go this far, at least a 2 backups strategy (or one
backup and one full data copy on a reliable FS, such as ZFS) - also
remember that backups are not repos (and that you can also goof with
cloud or cloud can goof with you).

Keeping non-encrypted copies of your disks partition tables is also a
good idea and part of a good disaster strategy that you MUST put on
paper and make running, at least in your mind, in a very calm
environment, to see if there are no quirks in it - also note that
there's not one strategy but several strategies to consider (what if the
data center burns, what if main servers power lines are struck by a
lightning, what if a rogue employee steals some disks, what if the
network get stuffed with a ransomware or some other shit the same level
of threat, etc).

Of course, you want to also have uencrypted copies of each and every
key+password from BB machines backups.

That said, don't drink to much (strong) coffee and good luck.

Jean-Yves


More information about the Borgbackup mailing list