Question regarding cloning Centos 6.8 Server using Rsync
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Question regarding cloning Centos 6.8 Server using Rsync
I have never cloned a Linux Server before and need to find a free way to do it. I read an article about using rsync to accomplish this. Thhe server being cloned is a Dell PowerEdge T410 server and the destination server is a HP DL 380P G8 Server. My question is, that when using rsync to clone the server, will I run into issues with storage drivers since the servers are from different hardware vendors? Are there certain folders I need to exclude in order to successfully use rsync to clone a server with dissimilar hardware?
If you don't copy /boot, you will not boot. Period.
In all likelihood, if you copy the entire system properly you should be fine. By "properly" I mean with the system quiesced - basically that means shut the system down and do the rsync from a liveCD. If the initrd doesn't have the necessary support, you can simply chroot in and fix it.
rsync isn't a cloning tool - so that means you will be allocating partitions in advance, and the filesystem UUIDs will likely differ. So fstab will need fixing.
These are the folders I had planned on excluding in the rsync command.
The the lvm data folders are identical on both servers. The purpose of the clone
is to copy over a Progress Database and associated ERP system. If I exclude the folders
below, is there a chance this will work?
Post #5 indicates that the target system does in fact already exist. So the thread is at best misleading. I don't know Progress, so I'll exit stage left.
I do have a clean install setup of Centos 6.8 setup on the new destination server. I am just trying to verify if that the folders I plan to exclude with give me the results I am looking for. I have never used rsync before and am a little leery.
Better, IMO, would be to figure out what you need to include. To do that, you need to know where the files relevant to the functionality you want to transfer are located.
For example, If I want to replicate a web server, I know to take the content (e.g. /var/www/) and the configurations (e.g. /etc/httpd/), but after I've done a fresh install of apache on the new systems.
That said, if you're working with a fresh install on the target, just try it. If it doesn't work, you can recover by doing another fresh install.
Rsync creates a folder with no label and copies all directories and files to it
I attempted to clone a linux system using rsync and received some odd results.
The command I used was this:
rsync -vPa -e 'ssh -o StrictHostKeyChecking=no' --exclude-from=/root/exclude-files.txt / DESTINATIONIP:/
It appears that the rsync command created all the folders, but when listing there contents found they were all empty.
After looking more closely, it looks like the rsync command created a new folder with no label or name and then copied
all my folders and files to it.
What am I missing here? I was prompted for the root password on the destination machine and provided it. It appeared that
that everything was copying over fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.