Our digital belongings are growing in size and importance. Family photos, accounting documents, beloved video games, losing them would be a nightmare. Having a backup is definitely mandatory. And if you’re self-hosting a lot like me, an offsite backup is a good way to be able to sleep calmly at night. I recently needed to rebuild my offsite storage system and so I decided to share my setup and my experience using it. This might be a long series, so hold on!
What Are Offsite Backups?
Offsite backups mean storing copies of your data in a different physical location from your main data. That means outside of your house! This way, if something unexpected happens (like a fire, theft, or hardware failure), your data is not completely lost. You could use cloud services for this, but we’ll focus on self-hosted solutions. I like to be in control, plus it gives me good understanding of how it all works.
Benefits of Offsite Backups
- Data Security: Keeping your data in a separate place protects it from local disasters.
- Redundancy: Extra copies of your data mean you’re covered if something goes wrong.
- Peace of Mind: Knowing your data is safe offsite gives you one less thing to worry about.
Additionally, if your backup is offline (in cold storage), it will be cheaper to run. No electricity or compute needed. And no need for fancy firewalls or access management, no one has access to the data unless they physically get to the hard drive.
My Self-Hosted Offsite Backup Setup
I run a local NAS with mirrored hard drives, shared over SMB on the LAN. This is the primary storage.
Next, there is a tiny ARM computer with an external hard drive that receives a weekly snapshot from the NAS, stored and encrypted via BorgBackup.
Lastly, a lonely external hard drive lives in my relative’s flat. And every time I make a visit there, I bring the other hard drive and swap them out.
Self-Hosted Backup Solution Overview
Step 1: Set Up Your Backup Server
- Choose Your Hardware: An old computer, a NAS, a Raspberry Pi. Make sure you have enough storage space on two separate drives.
- Install Linux: A lightweight Linux distro like Ubuntu Server or Debian works great.
- Secure Your Server: Set up SSH for remote access, configure a firewall, and keep your system updated.
Step 2: Configure the Backup Software
- Install the backup software: BorgBackup in this case.
- Configure mount points: both to the source and the destination of the backup.
Step 3: Automate and Monitor Your Backups
- Set up the automation: Fetch the data diff, compress and encrypt it, store it.
- Monitoring: Make sure you periodically find out that things DO work.
- Swap the drives: This is the actual offsite step!
Step 4: Test Your Backups
- Regular Testing: Periodically try and restore some data to make sure your backups and tools work.
- Health Checks: Inspect the state of the drives to replace them before they go ERR!
Is that it?
I didn’t even start yet! This was just a brief introduction of what I’m about to discuss in this series. More details to come in the next part where I’ll look into setting up the hardware.