Automatic backup software for servers

When my server lease expires (Jan 2018) I'm planning on moving to a physical computer sat in my flat and I want to make sure that the data is safe.

I'm thinking of having an SSD RAID1 setup to eliminate a single drive failure to prevent down time. Then I want to have two hard drives to do backups to which i'm going to alternate.

I've read about the issues with backing up to internal drives so I'll have them external and most of the time unplugged and I'll plug them in when I want to perform a backup.

I want to do an entire system backup partly to reduce the setup time to get going again but mostly because I don't remember everything that is on the system and it's already all configured and working.

So firstly I'm asking if anybody knows a backup software for CentOS or any other Linux distribution that can do full system backups and restore.

Additionally I think it would make this process so much easier if I were to install a hot swappable bay on the front of the pc and have the system automatically trigger the backup when it detects a drive has been connected to this slot.
So my second question is if anyone knows if this is possible and any considerations to take with this?

Cheers,
- Benji
Last edited on
I'm thinking of having an SSD RAID1 setup to eliminate a single drive failure to prevent down time.
Here's a well-known rule of thumb: if you have important data, either keep three or more copies, or just one. Never keep two, because in case of discrepancies you won't be able to tell which one is correct.
Therefore, you should avoid hardware RAID. Hardware RAID 1 is not reliable in the face of data corruption. It can only protect you against total drive failure. Instead, use a file system that does block-level checksumming and can tell (with a high degree of certainty) whether a block contains correct data. Nowadays, the best option for this because of performance and reliability is ZFS.

I've read about the issues with backing up to internal drives so I'll have them external and most of the time unplugged and I'll plug them in when I want to perform a backup.
I've used this method in the past, and I've found that it's actually less reliable than an internal drive. I don't know if it's because of increased wear from start-stop cycles, or because an external drive is more likely to get banged around, or what.

Here's the scheme I would use if I want to be reasonably safe:
1. Working copy in a raidz file system.
2. Frequent backup to a computer in the local network.
3. Less frequent encrypted backup uploaded to some cloud service. If the backup can be made small enough to fit in the free tier, all the better.
4. Occasional backup to an external drive that you keep someplace else (e.g. at work).

Additionally I think it would make this process so much easier if I were to install a hot swappable bay on the front of the pc and have the system automatically trigger the backup when it detects a drive has been connected to this slot.
If you want to minimize downtime even in case of drive failure, disk caddies at the front is a must. But keep in mind that with a small setup such as yours, you won't see more than one drive failure every two or three years, tops; with SSDs it depends on how much data you write per day. You'll suffer Internet outages much more frequently. Replacing a failed drive takes only a few minutes. Let's say five minutes per 2.5 years, that's five nines availability.
Lots of good advice, thanks helios.
I'm all for using alternatives to RAID, especially if they're considered higher safety and reasonably quick.

I'll also have to take a deeper look into internal vs external backups... now I'm thinking it may be a good idea to do automatic backups (daily or weekly) to a secondary internal drive, and then to an external drive on demand so I have the best (or worst) of both worlds.

Any suggestions for automatic backup software? At the moment the only thing I have in mind is a cron job making a tar archive because I've not had much time to see what's available.
Key features would be full system backup (with certain excludes) while running, with relatively easy restore.

If you have any suggestions for what kinds of backup systems to look into I'll do some research on that too.

Cheers
ZFS can do snapshots of an online file system, and if you install the OS into an LVM logical volume, LVM can also do snapshots.
Sorry, I can't recommend any backup systems.

By the way, I recommend setting up a VM to test your desired configuration before the real thing.
That's not a bad idea.

I think my biggest concerns and the reason I'm having a backup are:
a) basic drive failure
b) viruses and attacks (internal at risk)
c) power spikes and other environmental dangers (internal at same risk as primary, external at lesser risk if stored correctly)
d) PEBKAC issues (internal at risk)

So I think I will go with an external drive or two and have to be careful about the handling... it may just be that I have a caddy that lives on top of the desktop and most of the time it's unplugged, but the drive remains there.

Now to take a look at ZFS and LVM.
Last edited on
Being a newbie to Linux I'm looking for something simple...
DD looks like it could be useful, but prone to PEBKAC :)
I'll assume that I can't write from the backup drive to the active Linux drive so for restoring I'll need to use a live boot or something, not much issue there.
c) power spikes and other environmental dangers (internal at same risk as primary, external at lesser risk if stored correctly)
As long as you use a good UPS and set up nut properly you don't really need to worry about this, up to the point where lightning directly strikes the case.

I don't recommend using dd on volumes/block devices created by volume managers like LVM or ZFS, even when using snapshots.
Google ZFS backups for some great alternatives, such as this one (question): https://unix.stackexchange.com/questions/113743/zfs-snapshot-to-file-as-backup-with-rotation
zfs send snapshot_name | gzip > snapshot.gz

The only downside of this is that you don't get incremental snapshots. Every snapshot.gz contains the entire ZFS state.
I currently can't afford a UPS, but it would certainly be nice to have one. I can get a simple spike suppressing power strip but it probably won't be as good.

I don't really mind not having incremental backups. And I did a little looking up of ZFS, it looks like a virtual file system, so I'd have to setup this virtual files stem on top of additional drives/partitions so it can then be used to store my data and be able to perform backups? (Please correct me if I'm wrong).

I'm looking for something simple that requires next to no setup / configuration, and is quick and easy to get running again in the event of a fail.
You really don't want to leave a system up 24-7 without any kind of battery backup. At least get a small one that will give the system enough time to shut down properly.

I did a little looking up of ZFS, it looks like a virtual file system, so I'd have to setup this virtual files stem on top of additional drives/partitions
No, a virtual file system encapsulates a file system on top of another. ZFS does nothing like this.
ZFS is not completely automagical. You do need to set up a few things and think about how you want to configure your disks, it can't figure this out for you. But if you've ever set up a system with LVM, it's almost exactly the same.

But hey, if you don't care about data corruption from bit rot you can use hardware RAID. That takes minimal input on your part. Do remember to initialize the disks if you use RAID1 or RAID5, though, otherwise in the event of a drive failure the data is toast.
Would it be possible to put the entire operating system on a ZFS stop or does it require an OS to be installed, then ZFS installed and then you can use ZFS for files and stuff?
That's called "ZFS on root". It can be done but it's a little bit tricky unless you use an OS that natively supports ZFS, like Illumos (Solaris-derived) or some BSDs. I wouldn't advice it for your first time using ZFS.
Topic archived. No new replies allowed.