1 |
On Friday 08 June 2007, Hemmann, Volker Armin wrote: |
2 |
> On Freitag, 8. Juni 2007, Aleksey Kunitskiy wrote: |
3 |
> > Hi all, |
4 |
> > |
5 |
> > Is it safe to move my linux system by using: |
6 |
> > #>cp -rp /mnt/old_part /mnt/new_part |
7 |
> > and approriate changes in grub.conf/fstab on new system location ? |
8 |
> |
9 |
> nope. |
10 |
> |
11 |
> cp -a if you really want to use copy. But doesn't kill that the |
12 |
> ctime/mtime making uninstalling things a pain? |
13 |
|
14 |
No. |
15 |
|
16 |
cp -a is equivalent to cp -dpPR |
17 |
|
18 |
and from the man page: |
19 |
|
20 |
-p same as --preserve=mode,ownership,timestamps |
21 |
|
22 |
What the OP *will* have a problem with a copying /proc, /dev, /sys and |
23 |
other virtual filesystems. When I do this trick, I usually dd or tar or |
24 |
cp -a entire filesystems and then copy / with this trick: |
25 |
|
26 |
mount -o bind / /some/tmp/dir |
27 |
cp -a /some/tmp/dir /some/other/dir |
28 |
|
29 |
This ensures that only files actually on-disk are copied |
30 |
|
31 |
alan |
32 |
|
33 |
|
34 |
-- |
35 |
Optimists say the glass is half full, |
36 |
Pessimists say the glass is half empty, |
37 |
Developers say wtf is the glass twice as big as it needs to be? |
38 |
|
39 |
Alan McKinnon |
40 |
alan at linuxholdings dot co dot za |
41 |
+27 82, double three seven, one nine three five |
42 |
-- |
43 |
gentoo-user@g.o mailing list |