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

Re: backing up LVM volumes



On Tue, 27 Apr 2010 14:51:57 -0500
"Boyd Stephen Smith Jr." <bss@iguanasuicide.net> wrote:

...

> For "normal" file operations, taking an LVM snapshot of the mounted filesystem 
> and then making your backup from that should be sufficient.  This should even 
> work for postgreSQL database files (though, it is not optimal).  MySQL has a 
> history of being more flaky, but it might work there as well.
> 
> If you snapshot a mounted file system, the snapshot will be approximately 
> equivalent to the original file system, uncleanly unmounted at that exact 
> moment (think: power failure).  It's possible to then take backups of an 
> active system with no downtime (although I/O load will certainly go up during 
> the backup).  If you mount the snapshot as part of the backup procedure, a 
> journaled file system will want to replay the journal then.  Otherwise, a 
> journal replay will be required at restore time.  PostgreSQL (etc.) will also 
> end up doing a journal replay / recovery at restore time.
> 
> If you cleanly unmount a file system, take a snapshot of it, remount it, then 
> make your backup from the snapshot, you should be in a much better position.  
> You will have a little bit of downtime, but the snapshot will be of a cleanly 
> unmounted file system that will be totally quiesced during the backup process.  
> Again, I/O load will likely be high during the backup, but that's not easily 
> avoided.  Since the file system was cleanly unmounted, no journal replay / 
> recovery will need to occur at any level at either backup or restore time.

Thanks for this explanation.  Your explanation of the difference
between snapshotting a mounted vs. unmounted filesystem might explain
some of the trouble that I've been having with my snapshot based backup
procedure, but I've still had to give up lvm snapshots totally as
broken, primarily because of this (see my messages in the thread):

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549691

I've also been hit by this, although it *may* be harmless (or not -
this stuff could really use decent documentation):

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503268

Celejar
-- 
foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


Reply to: