Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Best way to copy /* ?
Date: Mon, 27 Dec 2010 15:48:48
Message-Id: 4D18B507.8040306@gmail.com
In Reply to: [gentoo-user] Best way to copy /* ? by Marc Blumentritt
1 Marc Blumentritt wrote:
2 > Hi,
3 >
4 > I have bought myself a Christmas present, a new shiny hard disk. Now I
5 > want to copy my old Gentoo system to my new disk like this:
6 >
7 > 1.) boot with gentoo boot cd
8 > 2.) mount my old system ind /old ( / in one partition, /home, /usr,
9 > /var, /tmp and /opt in lvm2 volumes and /boot on it's own partition)
10 > 3.) mount my new disk ind /new (just 2 partitions, 1 for / and 1 for /boot)
11 > 4.) copy from /old to /new
12 > 5.) modify fstab and prepare grub
13 > 6.) reboot
14 >
15 > Concerning step 4: what is the best copy command?
16 > I tried with
17 >
18 > cp -a /old/* /new
19 >
20 > but got some problems in /home. My user dir got the wrong permissions (I
21 > d'ont know, if this is in some way connected with /home being a mount
22 > point). Of course this could be the same in other dirs.
23 >
24 > Is there a better method? I read years ago on this list about using tar
25 > with this (piping the tar output into a second tar command, which
26 > extracts the files to their final destination).
27 >
28 > Are there other tools? Or did I use cp in a wrong way?
29 >
30 > Regards
31 > Marc
32 >
33 >
34
35 I always used cp -av myself and it always worked. I never had
36 permission problems either.
37
38 Some people do use tar especially if it is over a network or something
39 like that. I don't have the command tho since I never used it.
40
41 Dale
42
43 :-) :-)

Replies

Subject Author
Re: [gentoo-user] Best way to copy /* ? Peter Humphrey <peter@××××××××××××××.org>