From: Stephen Isard (S.IsardDeleteThis@ed.ac.uk)
Date: Fri Mar 16 2001 - 11:36:06 CET
Jef Knoors wrote:
> Hello fellows,
> I need to backup a hard disk and used:
>
> mount /dev/hda1 /mnt/dos
> mount /dev/hda5 /mnt/temp
> cat /mnt/dos/* | gzip -c > /mnt/temp
I'm not completely clear what you are meaning to do here, but two things
look wrong:
1) cat /mnt/dos/* is going to cat together all the files in the top
level directory and that probably isn't what you want, especially if
there are subdirectories. If you want to capture the directory
structure of /dev/hda1, you should do something like "tar cf - /mnt/dos
| gzip" instead. (You don't want "-c" with gzip if you are piping
through it.)
On the other hand, if you are trying to make a copy of the raw disk,
boot block and all, then you don't want to mount it. Just do "dd
if=/dev/hda1".
2) On the other end of the the ">", you may be overwriting the /mnt/temp
directory. I'm not really sure, but that's what would have happened on
early unix systems. On linux I would have expected a message saying
"operation not permitted" (but I'm not about to try it myself to find
out :-) ). Anyway, if you are intending to copy what is on /mnt/dos as
a tar file, then you want "> /mnt/temp/doscopy.tgz" or some other file
name of your choice. On the other hand, if you are trying to make
/dev/hda5 look like a byte for byte copy of /dev/hda1, then you
shouldn't be mounting /dev/hda5 and your dd command should be along the
lines of "dd if=/dev/hda1 of=/dev/hda5".
I guess there is a third possibility of making a byte for byte copy of
hda1 and compressing it in a file on hda5. Then you would mount
hda5, but not hda1, and do
dd if=/dev/hda1 | gzip > /mnt/temp/hda1copy.gz
Hope that helps.
Stephen Isard
> I get after a 5 minutes a error:
> Bus error
> Is that because they are on the same device?
> Can I use 'nc' to put it on a harddisk on a different computer?
> I have a parralel cable that can connect (tested and found OK in
> dos)
> Greetings, Jef
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
> For additional commands, e-mail: mulinux-help@sunsite.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk
This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:18 CET