Ubuntu – Automated nightly backup of 1TB drive on Ubuntu Server

automationbackupbackup-restorationUbuntu

How you would set up an automated nightly backup for the whole disk (boot and data partition) running Ubuntu Server?

I have a 1TB drive (current usage 200GB) and I want to have daily clone of this drive on another drive (the same capacity and model), on the same machine.

I was previously running dd to have partition backup. But now I'm looking for some bulletproof solution to have a HDD clone to switch to in case of crash.

RAID is not an option, as when something is broken/deleted on the first drive, this happens on the other drive too (I know I should have RAID + the backup solution).

Copying the whole 1TB would take some time, so I'm looking for a tool which is able to find the daily differences and just update them.

The other problem is that that I need the clone of the whole disk (both partitions – ext2 and lvm + the boot record).

How would you set up this?

Best Answer

First of all, a backup isn't a backup if it's in the same machine that you're backing up. You should be backing up to another server or external media (tape, disk, whatever) and keeping it offsite.

Right now you have two problems:

  1. You're not using RAID. You're correct that RAID isn't a backup. RAID is for availability during hardware (disk) failures. If this server is for anything client-facing or an important internal process, you should be using RAID. There's no excuse not to, disks are cheap.

  2. You aren't doing backups. What you want is to be able to do a BMR (Bare Metal Restore) in the event of a crash, but you also don't want to be pushing 200+ GB over the wire each night. This is reasonable, and is why every backup solution on the planet does incremental and differential backups. In many cases, you take a full BMR backup over the weekend, and do daily or twice-daily incremental or differential backups throughout the week. If you have a failure, you restore the BMR backup first, then the latest differential.

There are, literally, hundreds of products that do what you're looking for. NetBackup, Backup Exec, FalconStor, Networker, Avamar, etc. Call a vendor that you trust, explain your requirements, and ask what they recommend that's in your price range or scour the web for an open-source solution that is compatible with your distro and meets your requirements.


tl;dr - Don't backup to another internal disk. Buy a product that suits your needs. Use RAID, but not as a replacement for backups.

Related Topic