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

Re: file system dumps



On 22:10 30 Jan 2003, Michael Weiner <hunter userfriendly net> wrote:
| On Thu, 2003-01-30 at 21:27, Cameron Simpson wrote:
| My apologies for being nebulous, i was looking for a tool "like"
| xfsdump. Honestly, it hadnt occored to me to investigate dump.I am more
| accustomed to doing a dd if=/dev/sda of=/dev/sdb bs=10 & but seems
| somewhat inefficient to me as it takes about 3 hours to complete.

Unless you filesystem quite full it's wasting a lot of time copying
empty space. But it will at least be doing sequential access - tar will
be scattered over the disc depending on the file block layout; probably
mostly-sequential within a given file.

| But i
| will say, does make a nice "seed" mirror, but same issue applies - if
| the source is bad, the target will be bad.

More to the point, the image can be corrupt; tar or rsync (or anything
above the filesystem layer) can get a file during modification, but below
that you can end up with a busted filesystem - needing fsck - very bad.

Gordon Messmer's remark about xfs's snapshot facility is right on - if
you want "dump" of a live filesystem it may be worth your while using
XFS for such things.

| But lets assume the source
| AND target are both good going in. I was planning on just going ahead
| and trying your tar or dd.

I would prefer tar myself. Above the filesystem layer.

| THANK YOU thats exactly what i was looking
| for, as for the tar command sequence. And now, that we have an exact
| duplicate, using rsync, disk-to-disk, how are you using rsync to keep
| them in sync?

Just run it again:

	rsync -avWHP source/. target/.

Drop the "v" and "P" when happy. The "W" says copy-whole-file - when the
source and target are on the same machine it's better to just throw the
whole file across instead of using the checksum partial update stuff.

Cheers,
-- 
Cameron Simpson, DoD#743        cs zip com au    http://www.zip.com.au/~cs/

Follow! But! Follow only if ye be men of valor, for the entrance to this cave
is guarded by a creature so foul, so cruel that no man yet has fought with it
and lived! Bones of four fifty men lie strewn about its lair.  So,
brave knights, if you do doubt your courage or your strength, come no
further, for death awaits you all with nasty big pointy teeth.
- Tim The Enchanter





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