Copying /dev/* to another partition

Larry McVoy lm at snafu.Sun.COM
Thu May 31 11:45:47 AEST 1990


In article <2538 at tuminfo1.lan.informatik.tu-muenchen.dbp.de> k2 at charly.bl.physik.tu-muenchen.de (Klaus Steinberger) writes:
>rtidd at mwunix.mitre.org (Randall Tidd) writes:
>
>>I am running SunOS 4.1 on a Sun 3/160.
>
>>I am trying to clone my root partition to a backup partition (just
>>root and subdirectories, but *not* other partitions such as /usr,
>>/home, etc).  I ran into a problem when trying to copy /dev; when I
>>try to cp /dev/sd0a (for example), it will try to read from the device
>>/dev/sd0a rather than copy the actual file /dev/sd0a.
>
>Use cpio or tar for this purpose. That's the way to do it.

And don't forget to install the boot block - just copying it doesn't
work.  Check out installboot(8). Also - your backup /etc/fstab is going to
be different.

As a side note to sys admins: what this person is trying to do is *really* handy
if you are the sort that trashes partitions.  I do file system development
and I can't survive w/o a backup root & usr.
---
Larry McVoy, Sun Microsystems     (415) 336-7627       ...!sun!lm or lm at sun.com



More information about the Comp.unix.questions mailing list