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

Re: dd if=/dev/hda



Of course if you ask sun they say you should always drop into single
user mode to do any kind of backup, and of coarse you should always be
at the console when the backup is going on and you need to unmount all
filesystems being backed up and manually fsck after the backup just to
be sure, that's odd I've always used tar from cron to do my backups but
that's just me (I like tar, it seems to work great with tapes ;)
I'm just curious as to what some of the favorite backup methods for
admins on this list, like I said tar has been about all I've ever needed
although I have duplicated disks (mounted read only that were not part
of the booted file system) using dd and it worked really nice

Bob T. Kat
just putting in my .0083 pounds 


-----Original Message-----
From: luci-discuss-owner@luci.org [mailto:luci-discuss-owner@luci.org]
On Behalf Of Danny Sauer
Sent: Tuesday, April 02, 2002 9:37 AM
To: luci-discuss@luci.org
Subject: Re: dd if=/dev/hda

It'd be a real good idea to drop to single user mode, turn off any swap
partitions on the drive, and remount all the filesystems on that drive
as readonly first ("mount -o remount,ro /") before doing such a thing.
There's that whole thing with files being a series of blocks that point
to each other and directories being a pointer to all of the files
inside.

It'd sure be not-so-good to, say, have a file (file1) whose first block
was physically located at the beginning of the disk with some space
before
the next block.  The run of dd would copy the first block, then maybe
a program would recreate file1 by deleting and reopening it, and say
maybe
another program was increasing the size of a seperate file (file2).  The
second program happens to get the free space where file1 used to be
before
program1 recreates file1.  Now, dd has already copied file1's old first
block to the backup, but when it gets to where file1's second block
should
be (and where backup fielsystem's file1's first block points to for
file1's
second block), there's actually part of file2 in that space.  Oh, look, 
both files are screwed up.  Doh. :)

So, remount readonly before doing block-by-block backups.

--Danny, who would suggest using a RAID1 to begin with if the drives are
supposed to just be mirrors of each other...

"unsubscribe luci-discuss" in the body.


-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.