[plug] Migrate HDD on headless server

Bernd Felsche bernie at innovative.iinet.net.au
Sun Jun 29 00:24:51 WST 2003


On Sun, Jun 29, 2003 at 12:06:43AM +0800, Cameron Patrick wrote:
> On Sat, Jun 28, 2003 at 10:22:53PM +0800, Leon Brooks wrote:
> | On Sat, 28 Jun 2003 10:44, Cameron Patrick wrote:
> | > # Repeat for each partition on the /old/ drive...
> | > (cd / && tar clf - .) | (cd /mnt && tar xvpf -)
> | > (cd /boot && tar clf - .) | (cd /mnt/boot && tar xvpf -)
> | > (cd /home && tar clf - .) | (cd /mnt/home && tar xvpf -)
> | 
> | Er... having just done two of these, you need tar -l to make tar stay on 
> | the one filesystem, especially for /
> 
> Indeed.  Hence "tar clf" above :)

I prefer to use cpio as the data doesn't have to all travel through
a pipe to be read and written.

e.g.
	(cd / && find . -depth -xdev -print)|cpio -pdmuv /mnt

Only the names get passed through the pipe.

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!



More information about the plug mailing list