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 |