Solved

How to clone Linux server?

Posted on 2016-09-13
15
131 Views
Last Modified: 2016-10-03
This is using RedHat Linux Enterprise server 7.x. The server hardware is HP Proliant DL380 G7. We are thinking of cloning the whole server to another new server hardware. So far, not backup software is installed in this server. What would be the workable way to clone it? can we use rsync? or any proven commercial software.

Appreciate for any help.
0
Comment
Question by:MichaelBalack
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 78

Expert Comment

by:arnold
ID: 41797218
dump|restore is one way
You would need to first partition the new drives and then use dump | restore to "clone" the data from one to the other

dd is a low level media copy takes longer
and will need to be used to set the boot marker ....... on the new server...

The other option, is you can use rpm -qa and then add these packages to the new server.


Clonning while faster, could replicate/copy an existing issue yet unseen to the next one.

Do you have a kickstart installer setup in your environment where you can use it to build instances of servers that you need to deploy?///

Do you need the server you are cloning to be up an operational, or can it be unreachable/unusable during the process?
0
 
LVL 27

Expert Comment

by:Dr. Klahn
ID: 41797221
Is the system drive a single drive, or is it a RAID set?
0
 
LVL 1

Author Comment

by:MichaelBalack
ID: 41797232
Hi Dr. Klahn,

I am new to the server, I have to check. I let you know later.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:MichaelBalack
ID: 41797233
Hi Arnold,

Thanks for your prompting suggestion. Can you elaborate step-by-step?
0
 
LVL 78

Expert Comment

by:arnold
ID: 41797234
The following will provide some answers to the setup.

cat /proc/mdstat
lvmdiskscan
pvdisplay
vgdisplay
lvdisplay
fdisk -l
df -k
0
 
LVL 7

Expert Comment

by:Ned Ramsay
ID: 41797290
If you are moving servers anyway, I would virtualize it with VMWare. You can use the free edition on the new server, then do a clone via  CD or USB boot to copy it over.

Having the server on a recognized Virtual platform will make life so much easier in the future with snapshots and easy backups.

Vmware Free Edition on the new server.
Create a "Standalone Converter" disk for vmware.
Boot to it.
Point the software to the new server.
It will clone!

Then you can use things like VEEAM free to backup the server as an image if needed for fast recovery.
0
 
LVL 1

Author Comment

by:MichaelBalack
ID: 41797298
Hi Arnold,

I got the problem to access to the given linux server as root's password changed. I will run those commands once I can access.
0
 
LVL 78

Expert Comment

by:arnold
ID: 41797316
if you have sudoers configured for your user, and you have a login, login and run sudo -s provide your password and you should have elevated rights... similar to root.


Access to the system is required and booting from a separate BOOT media can help regain access provided you take note on how the disks/partitions are arranged using df -k which does not require root level access pay attention where / is as you would need to access /etc/passwd /etc/shadow to update root's password or /etc/sudoers to configure your user with elevation of rights access...

rpm -qa | grep -i sudo ......
root might not be allowed remote logins versus you not having the password.

su -
root's password if you have it should work/..
0
 
LVL 1

Author Comment

by:MichaelBalack
ID: 41799193
Hi Arnold,

see the attached command results.
EE---Command-Results.txt
0
 
LVL 78

Expert Comment

by:arnold
ID: 41799209
You have lvm overlay, you can use dump to create a full backup, and use restore to restore.

How is the RAID on the G7 configured?
If RAid 1 or 10,
You could use one of each mirrored pair, as the source for the new server make sure the new server is not connected to the network.

Pulling on of the existing mirrored raid Pairs and using it to boot the new server. While replacing the pulled drive when the system is running to allow for the raid rebuild.....
Note you Sid you have redhat 7, but your redhat release says you have redhat 6..
0
 
LVL 1

Author Comment

by:MichaelBalack
ID: 41799212
Hi Arnold,

Is using RAID 1, since 2 pieces of 300 GB SAS HardDisks

Sorry, my mistake. It is Redhat Enterprise server 6.6
0
 
LVL 1

Author Comment

by:MichaelBalack
ID: 41799214
Hi Arnold,

Forgot to share with you, the new server is located in different country, so, pulling the hdd method is not possible.

If using dd, what would be the command?

thanks a lot.
0
 
LVL 1

Author Comment

by:MichaelBalack
ID: 41799216
Hi Arnold,

New server hardware is different model, and thus the drivers. Will it be any issue with the dump and restore?
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 41799900
"Clone" is often used for a one to one replacement, i.e. systemA is dying. You clone it so that new SystemA can be dropped in place...

Do you have an identical system locally?
If drivers are a concern, dump and restore presents the same issue as pulling the HD and shipping it.
If you have ILO access to the remote, using a kickstart or install from media with the use of rpm -qa from the current to install the packages on the new...
Then the configuration files are the only thing that would need to be transferred minus the network settings ....

dump|restore can be used to copy DATA accross once both systems are accessible.

on the current dump -level0 /mount -f -  # this tells it to do a full backup on /mount outputing the data as a stream.
| ssh user@remotesystem 'cd / && restore -f -' the tunnel and then restore will run accepting the data from the stream.....
0
 
LVL 1

Author Closing Comment

by:MichaelBalack
ID: 41825923
Thanks Expert - Arnold in providing the suggestions on cloning the linux server. It works.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Samba Question 11 107
linux - yum package installation issue 2 113
The better OS Architecture 13 90
Enable SPF on IMSVA 6 22
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question