LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 06-23-2007, 04:43 PM   #1
tensigh
Member
 
Registered: Mar 2004
Location: Tokyo, Japan
Distribution: Backtrack 5 R3
Posts: 145

Rep: Reputation: 15
Backing up to multiple parts using dd


I'm trying to migrate from one server to another. I was going to try backing up the hd using dd, but there's a problem.

My old server has one main partition (/) and a swap partition. But I did the RIGHT thing on my new server and put /boot, /home, /usr and /var on their own partitions.

What's the best way to migrate from the old server to the new one?
 
Old 06-24-2007, 02:48 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Since you are changing your partitioning scheme, you won't be able to use dd, at least not without moving things around afterward. I would think your best bet would be to use cp or rsync. If you are copying across a network you could use rcp or scp in place of cp. (rcp is not recommended unless your network is completely trustworthy.)

After copying everything, you will need to install the boot loader on the the new machine. (Simply copying the MBR won't work.) You can do this by booting from a live CD. If you are using GRUB, you can issue the GRUB commands directly. If you are using LILO, you should first mount your / on a temporary mount point and mount your /boot partition normally, and then chroot into your temporary mount point and run lilo. With LILO, make sure you don't mount the root of your new file system nodev.
 
Old 06-24-2007, 02:53 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Great answer - I would simply add that if you chose to use cp, do it as "cp -a ..."
 
Old 06-24-2007, 09:31 PM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by syg00
I would simply add that if you chose to use cp, do it as "cp -a ..."
And likewise for rsync. AND ... (now that you reminded me!) neither scp nor rcp should be used because (TMK) there is no option for those to handle symlinks properly.

BTW syg00, your sig is really good. I'd use it in my own sig if "borrowing" wasn't such poor form!

Last edited by blackhole54; 06-24-2007 at 09:32 PM.
 
Old 06-25-2007, 10:38 AM   #5
tensigh
Member
 
Registered: Mar 2004
Location: Tokyo, Japan
Distribution: Backtrack 5 R3
Posts: 145

Original Poster
Rep: Reputation: 15
One more question

Thanks for both of those suggestions. So one final question:

Let's say I use cp -a. Is there anything I SHOULDN'T copy from the old system to the new one? Since the hardware is different, I wouldn't want to copy anything that would mess that up.

Should I leave /boot alone, since it already works? Or should I copy everything from the old system to the new one, then boot from a live CD?

Thanks a mill for your help.
 
Old 06-25-2007, 04:42 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
All of the copying should be done from a liveCD - mitigates having to worry about the pseudo filesystems; principally /dev and /proc.
Goes without saying the source server should be shut down first.

Copy the appropriate entire tree to each new partition - then fix the bootloader. I like to do it from the new /boot, but probably not strictly necessary; can be done from the code base on the liveCD.
 
  


Reply



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
toshiba parts rmakers General 1 10-30-2005 12:27 AM
Backing up 30G to multiple DVDs tonyfreeman Programming 1 12-23-2004 11:09 AM
ugrading parts of 9.0 to 9.2 bbking SUSE / openSUSE 3 12-01-2004 11:14 AM
Parts KrYpToN Linux - Hardware 1 03-24-2004 11:13 PM
Sun Parts? baldy3105 Linux - Hardware 6 02-12-2003 09:56 PM

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

All times are GMT -5. The time now is 09:00 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