Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2002 08:29:05 -0600
From:      "Jack L. Stone" <jackstone@sage-one.net>
To:        Mark <admin@asarian-host.net>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: restore question
Message-ID:  <3.0.5.32.20021115082905.010abd98@mail.sage-one.net>
In-Reply-To: <200211150425.GAF4PFI21317@asarian-host.net>
References:  <LGELIHAAGFPLCGDLOGMAIEKPCNAA.richard@radecom.nl> <020901c28b6f$f0b241c0$1200a8c0@gsicomp.on.ca> <127.0.0.1.20021114195745.01099888@mail.sage-one.net>

next in thread | previous in thread | raw e-mail | index | archive | help
At 05:25 AM 11.15.2002 +0100, Mark wrote:
>----- Original Message -----
>From: "Jack L. Stone" <jackstone@sage-one.net>
>To: "Mark" <admin@asarian-host.net>; "Matthew Emmerton"
><matt@gsicomp.on.ca>; "R. Zoontjens" <richard@radecom.nl>;
><freebsd-questions@FreeBSD.ORG>
>Sent: Friday, November 15, 2002 2:57 AM
>Subject: Re: restore question
>
>
>
>> There IS a program similar to Ghost with respect to making an image.
>> It's called "dd" and it's already installed on your FBSD system.
>> Run "man 1 dd" for options.
>>
>> Bear in mind that if you want an image of your whole disk, you'll need
>> the 2nd one to be at least equal in size, but you will lose any part of
>the
>> 2nd HD that is larger than HD #1 (I think Ghost does that too
>> -- or used to). dd can be limited to imaging only a slice however.....
>>
>> This questions comes up monthly and the archives has numerous postings
>> over the past several months that will fill more details.....
>
>
>Yes, the question comes up many times; yet the right answer keeps lacking.
>:) Before I asked, I had, of course, done a bit of searching. And found that
>there are many disadvantages to using "dd".
>
>For one, using disk-blocks, instead of reading files sequentially, like tar
>and Ghost do, enhances the risk of data-corruption.
>
>For two, with "dd" you need to unmount filesystems first. Which makes it
>pretty useless on a production server. Yeah, like I can really afford to
>have my /usr slice be absent for half-an-hour. I think not. :)
>
>Actually, we are talking about backup, but the real issue is restore.
>Everybody can make a tar of the root system, or a dd image. Sure. Restoring
>it, however, in a manner that will yield you a bootable, instant runnable
>system, now that is another matter. And what to do with special cases like
>/dev?
>
>In all my perusing the net, I have yet to encounter one solution that said:
>"This is how you can make a full system backup, with this image, that you
>can immediately restore on a blank harddisk, and have your system up and
>running again."
>
>Many suggestions I read about ways to backup. But, like I said, restoring is
>the real issue. I can backup /proc for sure; the wisdom of restoring it on a
>life system, however, is another matter. That is why the only clean way of
>doing this, would be to make a disk-image, like Ghost does. And Ghost, so
>unlike dd, does NOT use disk-blocks, but reads files sequentially. When
>making a disk image, Ghost basically just does several partition images, and
>then adds partition table info to the overall disk image. No need to "zero"
>out the disk first, like with dd, so as not to have it waste too much space.
>
>Still looking...
>
>- Mark
>

Your research is a little short of the mark. I have made bootable backups
many times using dd and dump/restore -- yes, and on a "live system" too.
With a 40GB HD with 1GH CPU, a dd can be done in about 15 mins. That speed
depends too on the "bs=xxx" size used all the way from 1024 to 1m. You can
check the I/O speed like this:

Here's an example with an IDE drive:

#iostat ad0 1
        tty             ad0             cpu
   tin tout  KB/t tps  MB/s  us ni sy in id
     0    3  5.19   7  0.03  11  0  4  1 84
     0  126 127.36 183 22.74   0  0  6  2 92
     0   44 128.00 190 23.76   0  0  2  0 98
     0   44 128.00 191 23.89   0  0  5  0 95
     0   44 128.00 191 23.88   0  0  7  1 92

As you can see, it's really doing 128 kB transfers, for an average transfer
rate of almost 24 MB/s.

I've used 8192 and found it wasn't necessary to even run fsck on the
backed-up HD... just switched the cables and booted right up. You will
probably have to run fsck on dd'd HD images.

I prefer to use a dump/restore script (tabkes care of FDISK/LABEL too) that
keeps a bootable backup hard disk always at the ready (I also move backups
across the network for more safety and have restored that on another HD
with 100% success). Also, should I want to switch HDs around, I just run
the script before shutdown. I've done it many times on a live system, but
dropping down to single user is recommended. With dump/restore, I can
backup a HD with 6GB in less than 10 mins. Yes, it is a busy box that I
can't afford to have down any longer than necessary.

I don't know what more you could want... there is NO Ghost that will work
to my knowledge. I've done all of the same long searching just like you,
but dump/restore is one of the SAFEST way of moving file systems..... The
handbook says it IS the safeest way. If you want to do it right, study up
on dump/restore. I don't trust tar for live filesystems, or to keep
permission/links straight although many do use tar. I've used it many times
for moving the entire /usr directory. but wouldn't trust it on / or /var
(/var maybe -- but why if I can use dump/restore so quickly?).



Best regards,
Jack L. Stone,
Administrator

SageOne Net
http://www.sage-one.net
jackstone@sage-one.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20021115082905.010abd98>