1

We have dedicated CentOS machine running a customer management service, in a few days development will cease and we would like to take a complete backup of the hard-disks. The server has 2 500GB hard-disks using RAID1.

Now, I know that with dd (damn dangerous) we could take an exact mirror of the hard-disks (which is what we want), but I'm wondering if there less hardcore solutions that also offer incremental backups at a later point?

2
  • 1
    add another harddrive as spare, remove one of the drives in the raid1 configuration, done. You now have a complete backup of the data, the raid will sync with the spare. Mind this is just a one-time snapshot, not a backup solution
    – Niko S P
    Feb 2, 2012 at 9:48
  • We also running cashier systems of the system so we do need the RAID system. However it's worth a consideration as a snapshot.
    – Ben
    Feb 2, 2012 at 10:07

4 Answers 4

3

Cloning/Mirroring solutions such as dd may not be able to provide incremental backup. If you want to have a backup at different points, you need to use a tool like rsync or a complete backup solution like backuppc.

3
  • Love the idea of having a web front-end! Did you ever try it using backup over SSH?
    – Ben
    Feb 2, 2012 at 10:06
  • 1
    @Ben: Backuppc has a web interface and it supports several ways of backup using rsync, rsyncd, tar, and others. You can rsync over SSH.
    – Khaled
    Feb 2, 2012 at 10:25
  • +1 for BackupPC & rsync! :) Feb 2, 2012 at 10:29
2

What is it that you're backing up? A relational database? Misc files?

How much downtime can you afford? (if you want low downtime then you really must start planing for unscheduled outages - meaning you need at least one other machine).

If it were me and there was a need to minimise downtime I'd break a disk out of the mirror (if there's a DBMS running on it then stop it first, break the mirror and restart to get a consistent snapshot). At most you're looknig at a few seconds of downtime. Then remount the filesystem from this disk somewhere else for backup. It can then be hot-joined back into the raid set.

There are ways to maintain the service when creating a consistent snapshot - but these are specific to the DBMS being used.

As for getting the data off the hard disk....for a DBMS, use the DBMS tools for generating a backup - a file image may not be portable across different versions of the DBMS. Every DBMS I've come across will allow you to run 2 instances on the same machine (as long as they are using different data files / network sockets).

Don't use dd or dump - in addition to no error checking, there can be portability issues with these too. cpio and tar have been around for a long time, tar can tricky when bitflips / corruption occurs. I've been using afio for some time - it allows individual files to be compressed (rather than tar compression where the output stream is compressed).

1

You can use Clonezilla to make a image of a disk or partition compress it and upload it to a FTP or windows share. Read the documentation, because the software is very flexible.

2
  • Thank you for your recommendation, but unfortunately we are looking for close to 100% uptime, so booting from CD is not an option
    – Ben
    Feb 2, 2012 at 10:04
  • To have a consistent backup you need either to stop the application, or to use a storage that allows snapshoting (like LVM) Feb 2, 2012 at 11:56
1

You're right. This type of question has been answered in several forms on this site. My recommendation for a point-in-time snapshot solution for Linux systems is the (free) HotCopy product from R1Soft/Idera.

Basically, this is a kernel module and userspace tools that allow you to create copy-on-write snapshots of a partition on the fly. These snapshots do not persist across reboots, but can be handy for obtaining a clean copy of a dataset for shipping (rsync or otherwise) to another system/medium.

Also see: Clone/Mirror Live Linux (Debian) Server

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .