[BBLISA] dump or Legato Networker?

Dean Anderson dean at av8.com
Sun Jan 13 19:28:41 EST 2008


On Sun, 13 Jan 2008, John Stoffel wrote:

> >>>>> "Dean" == Dean Anderson <dean at av8.com> writes:
> 
> Dean> On Sun, 6 Jan 2008, Edward Ned Harvey wrote:
> >> 
> >> Is there any way to signal the Linux kernel to flush its filesystem write
> >> cache, directly before performing the backup?
> 
> Dean> sync(8) should do this.  But maybe not on linux... sigh.
> 
> The problem is that this will only check point the filesystem(s) for a
> few seconds at most.  If you have any processes which are still in the
> process of writing to file(s), then they can still cause problems.

Yes--if the filesystem is still active. If it has no open files,
everything is good.  But of course, using tar for backup also doesn't
get the writes on the part of the file already archived, either.  So a
random access write (eg a database)  can update the file so that it is
inconsistent on archive. Either way, there are problems with active
filesystems.

Even a checkpoint is not necessarilly consistent, because the database
program may have written the log on a different filesystem that isn't
checkpointed at the exact same time as the data file. Or it may have
datafiles spread across filesystems, which aren't checkpointed at the
exact same instant.

The only way to get it provably right is to shutdown to single user and
then backup (or unmount, sync, and then backup). But in single user,
both tar or sync followed by dump will work the same.  Shutdown or
dismount has been the recommendation since, well forever. My BSD 4.2
manual (1986) on restore says:

  "Restore can get confused when doing incremental restores from dump 
   tapes that were made on active file systems"

Backing up active fileysystems has always been a problem. But for years
and years, we've (that is, most people including myself) have done
backups without shutdowns.  Mostly, there are no problems. You do what 
you can with what you have.

> Again, it's something that people just accept because it's very hard
> to do this perfectly, though snapshots are helping.

Its easy to do it perfectly: shutdown to single user or unmount the
filesystem. Its not difficult to do perfectly; Its just not convenient
to do it perfectly.

Instead, its difficult (or impossible) to get it perfectly right on an
active filesystem without somehow quiesing the filesystem and of course
the applications using the filesystem. An unmount requires all open
files to be closed, first; And no files can be opened once unmounted.  
So, dump is better because it can backup the unmounted filesystem and it
can be certain (by dismount) that there were no changes during backup. 

But I don't know anyone that actually shuts down or unmounts. People
usually take their chances and also keep multiple backups.  How serious
do you want to be about backups and can you afford the downtime
necessary to get them perfectly consistent?

		--Dean

-- 
Av8 Internet   Prepared to pay a premium for better service?
www.av8.net         faster, more reliable, better service
617 344 9000   





More information about the bblisa mailing list