Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Clone a running gentoo machine onto another machine
Date: Sun, 30 Mar 2008 20:06:51
Message-Id: 20080330210511.3421cd0d@loonquawl.digimed.co.uk
In Reply to: Re: [gentoo-user] Clone a running gentoo machine onto another machine by Hal Martin
1 On Sun, 30 Mar 2008 15:48:54 -0400, Hal Martin wrote:
2
3 > You cannot use tar unless you create an exclude file, as it will copy
4 > the contents of /dev and /sys, which means the entire contents of RAM,
5 > and anything that is currently being generated by your devices will be
6 > copied as well.
7 >
8 > Personally, I would use either tar or rsync to do this, however, in
9 > saying that, I have never actually done this with a live system. This is
10 > the tar command I use for copying inactive systems, and it works quite
11 > well.
12 >
13 > (cd /mnt/source; tar cfpl - .) | (cd /mnt/dest; tar xfp -)
14 >
15 > I assume you could just generate an exclude file, and include that in
16 > the first command
17
18 You don't need an exclude file to avoid /dev and /sys because they are on
19 separate filesystems, so your use of -l takes care of this.
20
21 Rsync may work, or it may complain that files have changed between
22 building the list and copying them and you'd need to use -x to do the
23 same as -l with tar. Either way, shut down as many services as possible
24 during the copy, particularly anything that uses databases.
25
26
27 --
28 Neil Bothwick
29
30 If you got the words it does not mean you got the knowledge.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Clone a running gentoo machine onto another machine Eric Martin <freak4uxxx@×××××.com>
Re: [gentoo-user] Clone a running gentoo machine onto another machine Dan Cowsill <danthehat@×××××.com>