Gentoo Archives: gentoo-user

From: Hal Martin <hal.martin@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Clone a running gentoo machine onto another machine
Date: Sun, 30 Mar 2008 19:49:22
Message-Id: 47EFEEA6.9080402@gmail.com
In Reply to: [gentoo-user] Clone a running gentoo machine onto another machine by Benyamin Dvoskin
1 Benyamin Dvoskin wrote:
2 > Hi All ,
3 >
4 > I've been wondering how one can clone an entire gentoo system and copy
5 > it to another physical machine , while the original system is still
6 > running ( means , ghost , acronis and other tools that force me to
7 > shutdown the system are not acceptable )
8 >
9 > So , someone told me to try just "tar" the whole system to the other
10 > machine and "untar" it there.
11 It is possible, that I know, but it is also difficult.
12 >
13 > The question is how can I do that ? what are the correct attributes
14 > and flags ?
15 You cannot use tar unless you create an exclude file, as it will copy
16 the contents of /dev and /sys, which means the entire contents of RAM,
17 and anything that is currently being generated by your devices will be
18 copied as well.
19
20 Personally, I would use either tar or rsync to do this, however, in
21 saying that, I have never actually done this with a live system. This is
22 the tar command I use for copying inactive systems, and it works quite well.
23
24 (cd /mnt/source; tar cfpl - .) | (cd /mnt/dest; tar xfp -)
25
26 I assume you could just generate an exclude file, and include that in
27 the first command ('tar cfpl - .') and it *should* work for you.
28
29 The other way would be to use rsync, which I have less experience using,
30 but should do the job.
31
32 rsync -avHp --progress / /mnt/dest/
33
34 There's a space between / and /mnt/dest, just incase that's unclear...
35 >
36 > Or maybe someone have other ideas ?
37 Again, you'd have to find a way to exclude /dev /sys, and probably
38 another directory or two too, but again, I don't really have any
39 experience copying a live system. I'm sure other learned people on this
40 list will have lots of useful suggestions for you!
41 >
42 > Thanks
43 >
44 > Benyamin
45 -Hal
46 --
47 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Clone a running gentoo machine onto another machine Neil Bothwick <neil@××××××××××.uk>