[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perfect mirror copy?



Kent Andersen wrote:

what would be the procedure for making a perfect bootable copy of a primary
linux drive?
say I have two exact drives and want to make a backup of the first one so I
could boot it in another computer?

Please learn to "compose" rather than "reply" when you want to open a new thread. Most email clients that understand the concept of threading will collapse this thread which was opened to discuss anonymous proxies, and your unrelated cotribution will be invisible.

To duplicate a disk to an identical one:
dd if=/dev/hda of=/dev/hdc

If they're on different computers
dd if=/dev/hda | ssh remote.example.com dd of=/dev/hdc
or
ssh remote.example.com dd if=/dev/hda | dd of=/dev/hdc

There are other options, and you may want to use gzip or bzip2 to compress/uncompress data as it crosses the link.

Note that copying a drive in this manner while it's mounted rw isn't an especially good idea.

The target drive can actually be larger, and you can fiddle round with resizing tools if needs be.

You can also use tar, afio and lots of other programs to do file-by-file copies in these manners, and those allow you to change filesystems, and under some circumstances are quicker.



--

Cheers
John

-- spambait
1aaaaaaa@computerdatasafe.com.au  Z1aaaaaaa@computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/



Reply to: