Gentoo Archives: gentoo-user

From: Alexander <b3nder@××××××.ru>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How can I move system to new disk?
Date: Sat, 16 Jan 2010 10:25:53
Message-Id: 201001161326.37061.b3nder@yandex.ru
In Reply to: [gentoo-user] How can I move system to new disk? by Jarry
1 On Friday 15 January 2010 20:33:36 Jarry wrote:
2 > Hi, I'm facing this problem:
3 >
4 > I want to exchange hard-drive in my computer for other, bigger
5 > one. I do not want to add new hard-drive somewhere on mount-point
6 > permanently, I just want to copy everything from the old drive
7 > to the new one and then get rid of the old one. And of course,
8 > I'd like to use my computer as before. What is the best (maybe
9 > I should ask for safest) way to acomplish this?
10 >
11 > First I thought about "cp -a". But I'm not sure which directories
12 > I should skip (/proc, maybe some other like /dev?). And I do not
13 > know how cp handles links (if I first copy link and later target,
14 > where is the link pointing? to the original file or its copy?).
15 >
16 > Maybe dump/restore is better solution? Or something else?
17 >
18 > Jarry
19 >
20
21 it depends on how your drive partitioned and which FS is used. For example, if
22 the root disk (i.e. w/o /home and possibly /var directories) is the separate
23 partition with XFS file system you can use simultanious dump and restore on live
24 system. Not all FS has dump/restore utilities, however if it is available it
25 should be prefered over cp and tar and, possibly, rsync.