[PLUG] Copying files with rsync

Wil Cooley wcooley at nakedape.cc
Tue May 28 06:18:10 UTC 2002


On Mon, 2002-05-27 at 22:50, Shannon C. Dealy wrote:
> On Mon, 27 May 2002, Dave Poirier wrote:
> 
> > On Mon, 27 May 2002, Shannon C. Dealy wrote:
> >
> > > On Sun, 26 May 2002, Matt Alexander wrote:
> > > > Question 2:  If the data file is being written to when I run rsync, do I
> > > > run the risk of ending up with a corrupted data file on the backup server?
> > >
> > > Absolutely, but this is the case with any backup system that doesn't get a
> > > lock on the file before transfering it.  The only way to be completely
> > > safe is to stop all processes that might modify the files before doing
> > > the backup, or alternatively, if the programs accessing the critical files
> [snip]
> > Other option is to use LVM or other snapshot capable volume manager and
> > then back up the snapshot.
> 
> Interesting, I wasn't aware of this feature of LVM.  Unfortunately this is
> only a partial cure for the problem, it nicely prevents on-going
> operations from causing inconsistencies/corruption during the backup, but
> it does not deal with the problem of data which is in an inconsistent
> state at the time the snapshot occurs.  Some databases in particular, and
> probably other programs as well would need to be momentarily paused with
> their files in a consistent state before taking the snapshot in order to
> insure a completely clean backup.  In theory, a properly implemented
> database system will always keep it's files in a consistent state at
> any given instant, and should be fine to backup live using the snapshot
> feature (no need to pause), but experience says never trust that any
> implementation is what it "should" be.

But the nice thing about a snapshot is that it can be taken very
quickly, so you can shutdown your databases, take the snapshot, then
bring the DBs back up--in considerably less time than if you shut them
down and then backed up, and only brought them back up after they'd been
updated.  Or, you can dump your databases to text files (assuming you
don't have too much data) and ignore the state of the db files
themselves.

Wil
-- 
W. Reilly Cooley                           wcooley at nakedape.cc
Naked Ape Consulting                        http://nakedape.cc
              * Linux and Network Consulting *
irc.linux.com                                     #orlug,#lnxs

The average woman must inevitably view her actual husband with a certain
disdain; he is anything but her ideal.  In consequence, she cannot help
feeling that her children are cruelly handicapped by the fact that he is
their father.
		-- H.L. Mencken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20020527/0ea8911a/attachment.asc>


More information about the PLUG mailing list