LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-13-2011, 04:26 PM   #1
kitek
Member
 
Registered: Apr 2005
Posts: 252

Rep: Reputation: 15
What's Best Way to Backup a web server with one hard drive Running live


I currently have a centos 4.4 I believe running with a 250GB hard drive. I want to make an image of that hard drive. I have tried removing the drive and connecting it to my windows pc using an adapter that would allow my windows machine run the hard drive as it was a regular external hard drive. Of course windows doesn't reconize that drive since it is linux partitioned. I am thinking that I need to have the hard drive in the box I am wanting to copy and put in a blank drive in the box that I want to copy to. And boot from a live CD and use cat or dd to copy it. I have seen the commands before bust I am thinking this is the only way. Basically I am wanting to have a duplicate of the drive and build a whole new server that is already all setup. I will just change the host name and assign it another Public facing UP. Is this correct? Oh, and the new server will have different hardware. Might even be AMD or intel different from source or destination.
 
Old 03-13-2011, 04:48 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
There are a lot of ways to do this. The simplest way may be to use Clonezilla Live.

http://clonezilla.org/

My experience simply moving a configured Linux system from one piece of hardware to another is not encouraging. If the second computer were exactly the same as the first then you would be fine. If the second computer is significantly different then you may be better off installing Linux the usual way on that machine.
 
Old 03-13-2011, 04:51 PM   #3
nathanpc
Member
 
Registered: Aug 2009
Location: Brazil
Distribution: Ubuntu Lucid
Posts: 45

Rep: Reputation: 15
Tip of the day: Making Shells Scripts is a good way to automatize the process
 
Old 03-13-2011, 05:06 PM   #4
kitek
Member
 
Registered: Apr 2005
Posts: 252

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stress_junkie View Post
There are a lot of ways to do this. The simplest way may be to use Clonezilla Live.

http://clonezilla.org/

My experience simply moving a configured Linux system from one piece of hardware to another is not encouraging. If the second computer were exactly the same as the first then you would be fine. If the second computer is significantly different then you may be better off installing Linux the usual way on that machine.
. So starting over is best. That web server has one hard drive like I said. I have another hard drive that is exactly the same drive. I would like to dup it as a backup. Or is there some way I can add the drive and make it a mirror a raid or is that out of the question since it is already up and going. The motherboard doesn't have anything but IDE on board controllers without hardware raid. I wanted to make a software raid before and could really understand it. It looks like I would need one drive for booting and 2 drives for the mirror and storage. So I am pretty much going to probably need to build a new machine with hardware raid mirror or raid 5 and start over. Then when I run out of space build another from scratch? So I guess I need to just dup the drive currently often and just keep that hard drive around in case it crashes. I guess the sucky part is that I will have to pull the server out of the racks often to do this. But I haven't looked at that site yet.
 
Old 03-13-2011, 05:12 PM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
IMO you would be better off to duplicate the drive to use the second one as a backup. Then you could potentially use rsync to keep the second drive up to date.

I hate RAID. It solves some problems but it has its own problems. RAID is probably required for some situations. In those cases hardware RAID is best. Otherwise keeping a backup disk that you manually update is the easiest solution. If you needed to boot the backup drive because the primary drive failed you could have to persuade GRUB to use the second drive. That is not difficult. Cross that bridge when (if) you come to it.
 
Old 03-13-2011, 05:18 PM   #6
kitek
Member
 
Registered: Apr 2005
Posts: 252

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stress_junkie View Post
IMO you would be better off to duplicate the drive to use the second one as a backup. Then you could potentially use rsync to keep the second drive up to date.

I hate RAID. It solves some problems but it has its own problems. RAID is probably required for some situations. In those cases hardware RAID is best. Otherwise keeping a backup disk that you manually update is the easiest solution. If you needed to boot the backup drive because the primary drive failed you could have to persuade GRUB to use the second drive. That is not difficult. Cross that bridge when (if) you come to it.
I would like to do it the usb way. But I have had trouble in the past getting the machines to reconize a USB device attached. Is there a good sync software for that?
 
Old 03-13-2011, 05:24 PM   #7
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Recognizing a USB device is a different issue. If you are referring to Windows recognizing the device, as you mentioned in your first post, then you may have better luck under Linux. If the machine is old then it may only have USB v1 while your external device is USB v2. That won't work well if at all.

Clonezilla should recognize a USB attached disk drive if the motherboard recognizes it.
 
Old 03-13-2011, 05:41 PM   #8
kitek
Member
 
Registered: Apr 2005
Posts: 252

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stress_junkie View Post
Recognizing a USB device is a different issue. If you are referring to Windows recognizing the device, as you mentioned in your first post, then you may have better luck under Linux. If the machine is old then it may only have USB v1 while your external device is USB v2. That won't work well if at all.

Clonezilla should recognize a USB attached disk drive if the motherboard recognizes it.
It was the linux machines I was speaking of. Like the servers in the rack. I would like to be able to plug in and do some sort of backup with maybe clonezilla. I will check the USB versions. Is I was told before they would be automatically picked up. I figured you would have to mount them or something. Also backing it up while it is running as the primary drive, is that going to be a problem.
 
Old 03-13-2011, 05:45 PM   #9
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Backing up a running system is a little bit different. If you start with a Clonezilla backup and then use rsync to keep the backup up to date then you should be okay. Test it though. Don't wait until you need the backup to see if it will work.
 
Old 03-13-2011, 05:47 PM   #10
kitek
Member
 
Registered: Apr 2005
Posts: 252

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stress_junkie View Post
Backing up a running system is a little bit different. If you start with a Clonezilla backup and then use rsync to keep the backup up to date then you should be okay. Test it though. Don't wait until you need the backup to see if it will work.
Far as testing it like you said I think would be an excellent idea. To do this, should I just remove the working drive as if it had crashed and then put in another drive as if I replaced it and then what? do I have to install a distro to sync it back? again that questions might get answered when I check up on clonezilla.
 
Old 03-13-2011, 05:57 PM   #11
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You would restore from the backup drive to the replacement drive using Clonezilla.

Keep in mind that this whole scenario came about due to your original post. This is not how I back up my machines. When I get a machine set up I back up the MBR to the root directory then I make tar backup files to an external disk drive. Restoring to a new hard drive is very easy. However keeping the backups up to date is more work than the method that we have been discussing. My method allows me to back up several machines to one external disk drive.

Last edited by stress_junkie; 03-13-2011 at 06:10 PM.
 
Old 03-13-2011, 06:51 PM   #12
kitek
Member
 
Registered: Apr 2005
Posts: 252

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stress_junkie View Post
You would restore from the backup drive to the replacement drive using Clonezilla.

Keep in mind that this whole scenario came about due to your original post. This is not how I back up my machines. When I get a machine set up I back up the MBR to the root directory then I make tar backup files to an external disk drive. Restoring to a new hard drive is very easy. However keeping the backups up to date is more work than the method that we have been discussing. My method allows me to back up several machines to one external disk drive.
Definetly an easy backup would be great . Now I made a tar the other day but it's on the same drive. moving it was the hard part. I guess I need to go check out clonezilla. How are you backing up MBR? I am not asking for you to spoon feed me but it sounds like you got a system down and it must be working out for you well. I need a system for that. If you don't mind, could we talk about it maybe in another post or on a IM or something or you could pm/email me a process? I would be so thankful. I want to have a backup for 2 DNS, 2 Web Server(Low data amount) and 2 other linux servers doing misc stuff.
 
Old 03-13-2011, 08:28 PM   #13
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Back up the MBR as follows:
Code:
dd if=/dev/sda of=/sda-mbr.dd bs=512 count=1 conv=notrunc,noerror
Restore the boot code without the partition table as follows:
Code:
dd if=/sda-mbr.dd of=/dev/sda bs=440 count=1 conv=notrunc,noerror
Usually the MBR backup file would not exist on the same disk as the target but it can.

The methods that I have been using are based on practices in large data centers. I use these methods to practice my professional skills so the things that I do with my own machines are not necessarily the best choice for home or small business settings. For example a small business would be better off using a commercial application like Acronis for Linux. A home setting may be better off doing what we discussed above using Clonezilla and rsync.

Last edited by stress_junkie; 03-14-2011 at 07:10 AM.
 
  


Reply


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
Ubuntu 9.04 Server - looking for utility to backup entire hard drive mike34341 Linux - Software 1 12-26-2009 09:54 PM
Running Ubuntu Live CD on a Macbook with a busted hard drive samsom Linux - Laptop and Netbook 2 06-07-2009 12:42 PM
file backup on rehat server to WD my book external usb hard drive justintime24 Linux - Server 2 05-09-2008 01:31 PM
Hard Drive Backup Boffy Linux - Software 4 10-19-2004 02:38 PM
Sweet!Home Server and Desktop in a No Hard-Drive Computer through Live-CD frandalla Slackware 4 11-01-2003 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:01 AM.

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