Extending the Floppy Copy idea?
Ray Strode
halfline at hawaii.rr.com
Sun Apr 15 15:57:48 PDT 2001
> Would it be possible to extend this idea and make a copy of a CD using a
> similar command if you have a CD burner? What about copying an entire
> HD using a similar command?
Kindof. You can make iso images from cds, by copying them. Something like
cp /dev/cdrom myfile.iso
but you can't burn them using cp.
As far as hard drives go, I think it is possible to do it by using the major
device, like
cp /dev/hda bighugedrive.image
but I think you may run into problems if the other drive isn't the same
geometry
as the first drive, when you try to copy it back. I'm really not sure
though. I
think probably a safer way would be to copy each partition, like
cp /dev/hda1 partition1.img
cp /dev/hda2 partition2.img
cp /dev/hda5 partition5.img
etc.
Just remember when you do it that way, that the partitions you are copying
to
have enough space for the existing images (Better yet, use the same sized
partitions). The restore would be something like
cp partition1.img /dev/hda1
cp partition2.img /dev/hda2
cp partition5.img /dev/hda5
ofcourse you can skip the image step completely and just do
cp /dev/hda1 /dev/hdc1
cp /dev/hda2 /dev/hdc2
cp /dev/hda5 /dev/hdc5
if you have two drives in the system.
I guess I should point out that the name is completely arbitrary and so you
can
use anything you want. In a previous example I used floppy.img, but if you
wanted to be more descriptive you could use other names. Like if you were
making a backup of a program named Foo that had 3 disks, you could name them
foo-1.floppy foo-2.floppy foo-3.floppy. It's really completely arbitrary.
--Ray
More information about the LUAU
mailing list