1 |
On Sun, Mar 30, 2008 at 4:05 PM, Neil Bothwick <neil@××××××××××.uk> wrote: |
2 |
> On Sun, 30 Mar 2008 15:48:54 -0400, Hal Martin wrote: |
3 |
> |
4 |
> > You cannot use tar unless you create an exclude file, as it will copy |
5 |
> > the contents of /dev and /sys, which means the entire contents of RAM, |
6 |
> > and anything that is currently being generated by your devices will be |
7 |
> > copied as well. |
8 |
> > |
9 |
> > Personally, I would use either tar or rsync to do this, however, in |
10 |
> > saying that, I have never actually done this with a live system. This is |
11 |
> > the tar command I use for copying inactive systems, and it works quite |
12 |
> > well. |
13 |
> > |
14 |
> > (cd /mnt/source; tar cfpl - .) | (cd /mnt/dest; tar xfp -) |
15 |
> > |
16 |
> > I assume you could just generate an exclude file, and include that in |
17 |
> > the first command |
18 |
> |
19 |
> You don't need an exclude file to avoid /dev and /sys because they are on |
20 |
> separate filesystems, so your use of -l takes care of this. |
21 |
> |
22 |
> Rsync may work, or it may complain that files have changed between |
23 |
> building the list and copying them and you'd need to use -x to do the |
24 |
> same as -l with tar. Either way, shut down as many services as possible |
25 |
> during the copy, particularly anything that uses databases. |
26 |
> |
27 |
> |
28 |
> -- |
29 |
> Neil Bothwick |
30 |
> |
31 |
> If you got the words it does not mean you got the knowledge. |
32 |
> |
33 |
|
34 |
Now, correct me if I'm wrong, but I had read that if you don't copy |
35 |
the files in /dev, udev won't mount properly on the machine you're |
36 |
cloning to and all hell will break lose. Also, iirc, I believe I |
37 |
tarred a running machine (including /dev, excluding /sys) and the |
38 |
clone was successful. |
39 |
|
40 |
Any thoughts? |
41 |
|
42 |
-- |
43 |
Dan Cowsill |
44 |
http://www.danthehat.net |
45 |
-- |
46 |
gentoo-user@l.g.o mailing list |