Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] When copying an os to new disk
Date: Fri, 26 Feb 2010 16:00:56
Message-Id: 201002261700.23925.wonko@wonkology.org
In Reply to: Re: [gentoo-user] When copying an os to new disk by Kyle Bader
1 Kyle Bader writes:
2
3 > > I opted to reinstall from source that machine, which wasn't exactly a
4 > > bad choice anyway. But as always, rtfm is good advice! Thanks (not
5 > > sarcastic, except to mock myself).
6 >
7 > Another option other than rsync or dd is to use tar:
8
9 Yeah, that's what I usually do.n The fastest method probably is star,
10 but the syntax is a little different.
11
12 > tar cf - $old_dir | ( cd $new_dir: tar xf - )
13 > tar cf - $old_dir | ssh $other_host "( cd $new_dir: tar xf - )"
14 ^
15 The ':' separating commands should be a ';'. Using the -C option would be
16 a little easier, but your method also would work for star. This piping
17 through ssh is quite cool, isn't it.
18
19 If $old_dir is the root partition, I would bin-mount it first to somewhere
20 else, so other directories mounted to it (especially/dev, /proc and /sys)
21 are not copied:
22 mount -o bind / /mnt
23 old_dir=/mnt
24
25 Wonko

Replies

Subject Author
Re: [gentoo-user] When copying an os to new disk Kyle Bader <kyle.bader@×××××.com>
Re: [gentoo-user] When copying an os to new disk Neil Bothwick <neil@××××××××××.uk>