Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-28-2008, 10:12 AM   #1
Registered: Apr 2007
Posts: 45

Rep: Reputation: 15
Live system backup

In our current server environment there are a couple of servers which need periodic backup. These servers should under no circumstances go down.

What I would like to know if it is possible to backup (clone) the harddrives while they are up and running.
Based on what I read it seems that either dd or rsync combined with a cron job should suit this need.

Is this correct and are there any (easier and more user friendly) alternatives?

Thanks in advance
Old 03-28-2008, 10:23 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
LVM snapshots are a great way to do exactly this. alternatively if they are on raid1 you could look into breaking the mirror.
Old 03-28-2008, 11:09 AM   #3
Registered: Apr 2007
Posts: 45

Original Poster
Rep: Reputation: 15
Thanks for the response

LVM seems to be not an option since it requires reboots, reinstalls and reformatting. Otherwise LVM would be great and we will definitely look into it for future installations.

For the time being:

Is it possible to use dd to 'backup' a running system?
Old 03-29-2008, 05:37 AM   #4
Registered User
Registered: Mar 2008
Posts: 104

Rep: Reputation: 15

'dd' will do the job but in the end it's just a snapshot of a running system that has already changed when the backup is still being created.

If this is not about replacing the servers with new hardware, but rather a backup solution to have a corrupted server replaced within minutes by exchanging the Hard Disk, even then you should be aware that hard disk failures are not the only things that can break. So the fastest replacements time for all situations is provided by having an exact hardware clone of each server on your priority list.

Having such hardware twins I would rather constantly copy all contents by using 'duplicity' ( or any other similar backup tool, by applying changes on an hourly interval.

The 'Duplicity' package can handle remote backups. It avoids single large files by splitting the backup and keeping checksums to test for changes.

Hope this helps,

Fedora User

Last edited by simplicissimus; 04-02-2008 at 05:10 AM.
Old 03-29-2008, 08:23 PM   #5
Registered: Apr 2007
Posts: 45

Original Poster
Rep: Reputation: 15
Thank you for your reply.

Duplicity seems over the top.
We currently already have an exact same machine as a secundary system in case the first goes down. The only issue that currently exists is the posibility to easily synchronize the secundary system with the primary system.
Both need exactly the same configuration (as if they were the same), with the exception of the services that are currently running (due to licensing limitations and issues surrounding maximum connections).

It seems rsync might suffice and easily fit in our current environment.
Old 03-29-2008, 08:49 PM   #6
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
I do find rsync to be just the ticket but, I don't really feel a need to put it in a cron job. It doesn't take long to run and I can keep an eye on it for errors.
For example, I made a dupe of my fc8 partition so I can try out the new beta...
as root user
mkfs.ext3 /dev/sdb5
mkdir /mnt/test
mount /dev/sdb5 /mnt/test
rsync -xav / /mnt/test
# make a label for the new partition
e2label /dev/sdb5 /1

Add entries in grub and fstab pointing to LABEL=/1
Old 03-30-2008, 02:00 AM   #7
Senior Member
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Also, in the future, if possible, consider virtualization for live backups and live migration for your servers. It really does make managing your systems easier and takes added stress off your back!
Old 03-30-2008, 04:39 PM   #8
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 538

Rep: Reputation: 71

If you are actually running systems that should "never" go down, then you should move immediately to clustering.

I run rsync too, but there are problems.
1. In most production environments is the time gap between when the rsync job was run and the failure introduces a bunch of problems, especially if there is money involved.

2. The down time switching to your rsync backup is meaningful. Clustering eliminates all of that downtime.

Is it the case that the organizational will to build it right doesn't exist? I've been in a few situations where clustering was viewed as some kind of voodoo so it was never implemented. Unfortunately they had needlessly complex architectures that didn't fail elegantly.
Old 03-30-2008, 04:59 PM   #9
Registered: Apr 2007
Posts: 45

Original Poster
Rep: Reputation: 15
In our present environment clustering isn't an option, since we are using software that doesn't support clustering, nor do the current licenses allow this.

Basically if the system were to go know another system should be up withinn 15 minutes.
Effectively this means that the secondary system has the exact same configuration. So it would simply be a matter of starting the correct services and make ik look as if the service has never gone down.

In the near future more fail-safe solution will be implemented, but for the time being this is how it needs to be set up.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Live backup direct on CD/DVD satimis Programming 15 07-25-2006 02:18 AM
Live backup direct on CD/DVD satimis Linux - Software 2 07-21-2006 10:01 AM
LXer: Move an entire file system on a live Unix system LXer Syndicated Linux News 0 07-08-2006 05:33 PM
using a system backup Shavo Linux - Newbie 1 06-22-2005 04:43 AM
Backup of the system enemorales Linux - Newbie 2 01-05-2005 07:08 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration