Am Montag, den 19.02.2007, 04:42 -0200 schrieb Rodrigo Barbosa: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sun, Feb 18, 2007 at 07:14:16PM -0600, Les Mikesell wrote: > > Rodrigo Barbosa wrote: > > > > >>As a safety mesurement you could clone the machine ("cp -a") to a > > > > > >"cp -a" for cloning ? Errr, bad mistake. > > > > > >"dump -0f - / | ( cd /newlocation; restore -f - )" is a much better idea > > >on these cases. > > > > > > > The results should be pretty much the same on anything with GNU cp > > except that cp can copy to different filesystem types. It is a good > > idea to use the --one-file-system option and repeat for each partition. > > Are you sure ? Last I remember, "cp -a" does not preserve some of the inode > data. Also, it does some file reordering. > > Yes, most of these are inconsequential on a practical pov, but it is > still farther from cloning than using dump/restore. > > Of course, if you want real cloning you would have to use "dd", but > that is _way_ beside the point here. My mistake, i should have provided my definition of "cloning an OS" (not: "cloning a partition"): "making a copy of the OS that is similar enough to its original that it works the same way with no perceivable difference". "cp -a[x]" does exactly that (at least CentOS' GNU cp; it preserves labels like selinux contexts, too) provided that your apps do not operate directly on the blockdevs ("hexedit /dev/sda1"). I consider it being superior to dd to do this job as it "defrags" the filesystems. I copied several systems and never observed any breakage due to cp forgetting or changing low-level details. That may have been false back in '91, but things change ;) /nils.