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.
Hey. I've done this in the past, the very far past, and now I find myself back in the Linux world after many years. I need help with remember all the steps for cloning and then booting from a clone.
I have:
/dev/sda1 boot
/dev/sda2 / (root)
/dev/sda3 /home
I want to clone and boot from and have other data on:
/dev/sdc1 boot
/dev/sdc2 / (root)
/dev/sdc3 /home
I know I will need to point grub to /dev/sdc and probably fix fstab. If have completed the fdisk setup of /dev/sdc. Seems I remember sfdisk being used, as well as dd. Any input would be greatly appreciated.
There may be a Centos way to clone so you should read their (RH/IBM) documentation.
I guess one could use any number of file based copy means. Each one tends to need a live boot usually. There is at least one live state linux backup but I've never used it.
Things like rsync, tar, cpio partimage and gparted as well as others could copy usually.
dd is a tool that can be used to clone off a number of parts of a drive or entire drive. It's not an elegant way and has some issues.
As in most cases you have to fix all naming from grub to disk mounting to network naming either before clone or after.
Thanks all for you responses. I appreciate it. The purpose of the clone was to do an update on the clone and preserve the original boot disk. I was told that by a vendor that he had used yum update to take an older version of Linux, like 5, straight to 7. I have serious doubts that this kind of update would actually work ... but I wanted to try it. There are a lot of warnings online about doing such and it is not supported anywhere that I can find. The goal though is to update the older version of CentOS either by updating the clone or a new/clean install.
Thanks all for you responses. I appreciate it. The purpose of the clone was to do an update on the clone and preserve the original boot disk. I was told that by a vendor that he had used yum update to take an older version of Linux, like 5, straight to 7. I have serious doubts that this kind of update would actually work ... but I wanted to try it. There are a lot of warnings online about doing such and it is not supported anywhere that I can find. The goal though is to update the older version of CentOS either by updating the clone or a new/clean install.
Gotta wonder which vendor told you that...
Having just done it, I can verify the only way to get from 5.8 to 7.x is with a clean install. Afterwards, you can copy the data (/home) over and use your backup of the various config files to update the new config files...NOT recommending you copy them over, however. There are some significant changes in the apache configuration, for example.
Also, 5.x is SystemV init; 7.x is SystemD -- major change!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.