2

I have ubuntu server configured and working properly. Now I want to migrate exactly the same settings including all my data to another machine that could possibly be a different machine. Is there any way to clone each and everything as it is?

As I am novice ubuntu user please write step by step proces.

Thanks,

  • If your Ubuntu server does not have a GUI desktop (most don't) and does not depend on WiFi, and the new server does not need these either, there is a good chance that cloning the disk should work. You may need to make some changes such as assigning a different static IP address if you want to run both the machines at the same time. – user68186 Aug 18 '15 at 16:45
  • 2
  • It is server without GUI and wifi and I have in mind to change the IP as well. I was thinking to backup the root using tar and extract on other system, but just now I cam to know that some files those are in used or hidden will not be copied in that way. I can only access my server with putty or ftp client. Is there a way to clone the system over network. – Mk Swati Aug 19 '15 at 20:15
  • Please add all these additional information in the original question above by editing it. To make everything copy safely, you need to take the server off-line, attach a new drive, and boot from a Live DVD/USB, and clove the partitions. I don't know if this can be done by remote. – user68186 Aug 19 '15 at 20:23
  • I'm having the same problem, and thought about using the DD solution, except that on my original drive, I have a massive partition with only 10% used space. I need a way for DD to autoshrink that partition while cloning. Anyone have any tips for this? – DanRan Oct 20 '21 at 02:10

2 Answers2

2

the most time-saving solution is to use the command "dd" to clone your disk to another disk. Of course, the storage size of the newer disk should be equal or larger than your current disk storage.

sudo dd if=/dev/sdX of=/dev/sdY

WARNING: THIS COMMAND MAY DESTROY YOUR DATA. PLEASE MAKE SURE WHAT YOU ARE GOING TO DO BEFORE USING THIS COMMAND.

The "X" of sdX and "Y" of sdY depend on your machine. sdX means your current disk label. sdY means your target disk you want to move in. Please use "mount" or try to google to know your sdX label of your system. I could not judge the exact lable name for you because this varies between systems. In most cases, your current disk is /dev/sda and your target disk will be /dev/sdb.

use this command to get more information in your terminal:

man dd

You do not worry about driver issues too much. Linux kernel will detect and (try to) enable hardware components during every booting.

tai271828
  • 972
0

The problem is the hardware drivers, not all machines have the same hardware => they don't need the same drivers. It'll work if they have the same hardware. You just have to clone the disk.