In terms of stability and performance, is it better to clone the entire HDD to a new computer or start with a fresh install?
btw, much of my production software is in a virtual machine, which can be easily moved.But still, my ubuntu baremetal install (non virtual) is highly customized and tweaked.
IMHO, fresh install, a copy of the entire HDD (raw copy,
dd
style), or a copy of the whole file system (tar / rsync style) doesn't make much of a difference, neither in terms of stability nor performance.When you talk about copies, though, you need to be careful about a few things:
/boot/initrd*
files. With each kernel you generally end up creating aninitrd
, an image containing basic drivers that the kernel itself needs before it is able to boot your system. If the hardware where you copy your system to is different,initrd
is different, and may not be able to boot.xorg.conf
configuration and similar. Again, if the hardware is different, it is unlikely that the old configuration will work. Much of X config, however, is automatically detected in recent days.if you copy the whole HDD raw using dd to a new machine, the new machine needs to have a disk of similar size. Unless you are the kind of person that enjoys playing with parted :) Also, make sure the disk you are copying is not mounted (or mounted read only) and sane (
fsck
clean) before copying it. You don't want to copy a corrupted disk or a disk in the middle of a write.if you copy the whole HDD using
tar
/rsync
, make sure not to copy/proc
and/sys
, prefer using options like-a
and--numeric-ids
, and make sure again you don't copy files in an inconsistent state. Example: you really don't want mysql to be writing to a database file while you are copying it.That said, I've done both fresh installs and copies.
harddisk clone = OS clone/image ?
Clone /Backup / Image
Advantages of Clone
Once you have cloned the HD or OS than everytime your system has a big error instead of installing a new copy you can just restore everything in ONE click may be it takes normally 10-20 mins if the clone is not to much heavy.
Fresh Install
My suggestion
If your OS has alot of your stuff and tweaks and you want to keep them than and your system runs well than do a clone becasue if you have any kind of error than first try to remove the error and than clone cz you dont want to clone the error with your OS clone. And if you dont care about your tweaks/customizations/data than do a Fresh install [Always recomended when you do a fresh install do a clone of fresh install when the system is working great]