euglug.org

[Eug-lug] Gentoo system – moving drives

작성자

카테고리:



Rob HudsonSat Jul 10 11:15:10 PDT 2004

So which is better...

cp -a 
or tar cfl . | tar xfp

-Rob

On 20040710.0815, Bob Miller said ...

> 	# mkdir /new
> 	# mkfs -j /dev/hdc{1,5,6}
> 	# mount /dev/hdc5 /new
> 	# cd /new
> 	# mkdir -m 755 boot var proc dev sys # others?
> 	# mount /dev/hdc1 boot
> 	# mount /dev/hdc6 var
> 	# (cd /; tar cfl - .) | tar xfp -    # Note the "l" flag!
> 	# (cd /home; tar cfl - .) | tar xfp -
> 	# (cd /usr; tar cfl - .) | tar xfp -
> 	# cd /
> 	# umount /new/boot /new/var /new
> 	# rmdir /new