Copying A/UX to another disk

Alexis Rosen alexis at panix.uucp
Fri Apr 19 06:11:34 AEST 1991


dundas at granite.Jpl.Nasa.Gov (John Dundas) writes:
>I want to copy my entire root file system onto another (larger) disk.
>I seem to remember using a pipe like:
>	find / -print | cpio -pdl /something
>but this isn't working.  The actual command I am using is:
>	find / -depth -print | cpio -pdl /dev/rdsk/c1d0s0
>but when issued, this command complains that it 
>"cannot write in </dev/rdsk/c1d0s0>"
>(I am root when trying).  Any suggestions?

The problem with this is that you have to copy onto a mounted filesystem.
But if you mount the disk, it will be found by find, and you'll have an
infinite loop (you'll see that that disk isn't nearly as big as you though :-).

So what you want to do is this:
1) Make sure the new disk (and any others, if you have any) is UNmounted.
2) cd / ; find . -depth -print >tmp/files	# (Make the list of files)
   mount /mnt /dev/dsk/c1d0s0			# mount your new disk
   cpio -idm /mnt </tmp/files			# move over files

That's it. BTW, the -m flag to cpio is VERY important. Without it all the
files will take on the current date. You _don't_ want this.

---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
{cmcl2,apple}!panix!alexis



More information about the Comp.unix.aux mailing list