Mikolaj Kucharski wrote:
> Hi,
> 
> Looking at /etc/daily I can see that backup is done by dd(1) command:
> 
>       echo "Backing up root filesystem:"
>       echo "copying /dev/r$rootdev to /dev/r$rootbak"
>       dd if=/dev/r$rootdev of=/dev/r$rootbak bs=16b seek=1 skip=1 \
>               conv=noerror
>       fsck -y /dev/r$rootbak
> 
> My question is: backup isn't done by dump(8) and restore(8) because of
> /boot'ing stuff, right? If it is, why it could not be done by dump/restore
> and installboot(8)?

did anyone say it couldn't be?

What "problem" are you trying to solve?

> What procedure is more safety? dd'ing device and then run fsck on
> output device, or runing after dump/restore installboot?

There are multiple ways to do most tasks.  One has to be picked.

restore(8) requires that a partition be mounted.  That requires a mount
point you aren't currently using for something else.  dd requires no
such thing.  It can also be done in two lines of code...that's simpler
than an unmount, mount, dump/restore, installboot, unmount process.  I'd
also suspect that dd may handle open files in a more usable way than
dump, though I'm not really sure at all.

The only downside to using dd for this task I see is that if your / is
too large, it would spend a lot of time copying blank space.  Solution:
"don't make / too large!".  And even then, this really isn't an
issue...just ran a test on one of my machines that does this every
night...that part of the nightly process took less than 30 seconds on an
old, slow machine.  I'm rather shocked to see that I made the root
partition 300M in size...about three times as large as I should have, no
idea why I did that.  Actually, it is 1/6 full, so it could even be much
smaller than that.  30 seconds for this dup was nothing...and it was
less than a third of the total "daily" process.

Nick.

Reply via email to