I wiped my SSD by accident

I thought I would never need it. I thought it was unnecessary. I thought it would be a struggle to set it up and a burden to maintain. But, am I glad I setup some backup system anyway.

I do believe we should use our electronic devices as long as possible. Repurpose them for other tasks when they no longer upto the task we bought them for. I even posted a blog post advocating this. But I didn’t say much about data backups until now simply because I didn’t have a proper backup system for it. I thought it would be hypocritical of me to write about it when I am not practicing it. But I promised myself to do things more properly when I purchased my current laptop, Lemur Pro 2022 from System76. I setted up a data backup system. Then I wiped my SSD clean by accident on 2022-09-07. This blog post is about what happened, how my backup was set up and how I recovered my data.

The accident

I attemptet to install Pop!_OS on a 32GB flash drive to create a portable Pop!_OS system with secure boot support. I decided to boot into recovery partition of this laptop since it is there for installing Pop!_OS. In theory, it shouldn’t matter if I am installing the OS onto internal SSD or a USB device. But it turns out Pop!_OS installer didn’t find my 32GB USB sufficiently big. Then it targeted the internal SSD which had all my data.

At least I came to believe that was the issue after contacting developers on GitHub.

Duplicati with B2

I looked into few remote storage options and BackBlaze seemed like the most affordable option. So I followed their guide to set up Duplicati with B2 back-end. I guess it was working just fine, at least the bucket was getting larger with .aes files.

This small heart attack enducing mistake on my side was probably the worst “opportunity” for me to test my backup system. Only after reinstalling Duplicati I realized that Duplicati configuration was gone too. Why the heck didn’t I think about exporting it earlier🤦
But again, I had all the stuff like access keys and encryption passphrase recorded in my password manager. Oh am I glad I made a habit of using a password manager. It truely can be a life saver.

screenshot of a bitwarden entry holding my Duplicati secrets and passphrases. confidential data is replaced with big dots to hide them

Restoration

Recreating the configuration was as simple as following the guide again. All I had to do was clicking restore button on Duplicati config. It would connect and download my backups. But instead it hang midway while recreating the database. CPU was idle, fan wasn’t running, it was like the silence before the thunder all over again.

I decided to download the files first, then restore from a local source rather than loading work of downloading on Duplicati too. Now B2 wasn’t letting me create snapshot for some reason, because snapshots are the only way to download more than 5 files at a time. I guess I am downloading everything with using the command line now.

$ b2 authorize-account
Backblaze application key ID: $B2_keyID
Backblaze application key: $B2_applicationKey
Using https://api.backblazeb2.com
$ mkdir ~/B2bucket
$ b2 sync --threads 10 b2://revenge-subarctic-canopy-glorifier ~/B2bucket

I cancelled the old job and started a new restoration job but using the ~/B2bucket folder as the backup source this time. Everything was a smooth sail from this point onward. I just had to not open or edit any files while it was restoring (I think).

Don’t let backups scare you

I think I do know why I never used backups in the past. To me, backups always appeared as that complicated, expensive, burdensome thing that was so easy to postpone. But my overall experience was nothing but peace of mind. Sure I had few moments when I thought everything was lost and nothing would be back. It turns out, those were just a rookie’s growing pains.

Duplicati's web based user interface showing the home page

So please, if you haven’t already, give yourself the gift of peace of mind. It really is NOT a struggle to set up or burden to maintain. Set up backups using Duplicati with any of the storage options. You don’t have to use B2 like I did, you can even use Amazon’s S3 for all I care. Backup will be encrypted before upload anyway (hopefully you used a passphrase with 4 or 5 random words). Or, maybe repurpose an old HDD for this if you have to. But let there be encrypted backups.

Also, I owe a massive THANK YOU to past Murteza. He saved the day.

Comments

Comment on Fediverse or via email

EDITs

on 2022-10-27

  • Language is simplified to avoid confusion.
  • Many misspelling mistakes are fixed.
  • Became ever so slightly better at English langauge ☺️

This article was updated on 27 Oct 2022