On Friday 15 January 2010 20:33:36 Jarry wrote: > Hi, I'm facing this problem: > > I want to exchange hard-drive in my computer for other, bigger > one. I do not want to add new hard-drive somewhere on mount-point > permanently, I just want to copy everything from the old drive > to the new one and then get rid of the old one. And of course, > I'd like to use my computer as before. What is the best (maybe > I should ask for safest) way to acomplish this? > > First I thought about "cp -a". But I'm not sure which directories > I should skip (/proc, maybe some other like /dev?). And I do not > know how cp handles links (if I first copy link and later target, > where is the link pointing? to the original file or its copy?). > > Maybe dump/restore is better solution? Or something else? > > Jarry >
it depends on how your drive partitioned and which FS is used. For example, if the root disk (i.e. w/o /home and possibly /var directories) is the separate partition with XFS file system you can use simultanious dump and restore on live system. Not all FS has dump/restore utilities, however if it is available it should be prefered over cp and tar and, possibly, rsync.