[Top][All Lists]

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

CVS to back up MySQL databases?

From: Doug Lee
Subject: CVS to back up MySQL databases?
Date: Wed, 17 Jan 2007 20:11:02 -0500
User-agent: Mutt/1.5.9i

Do the CVS experts out there see any reason why I should not use CVS
as a means of making incremental backups of a MySQL database dump?  My
theory is that if I do the following, I will have the ability to
restore the entire database to exact states going back N days, where N
is selected easily and can easily be changed.  I also believe that,
at least for slow-changing data and assuming a wise selection of dump
formats, this technique will use minimal disk space for what it
yields.  I'm writing to see if anyone with more experience can find a
hole in this system:

1.  Create a CVS repository containing one file, which will be the
MySQL dump output file.

2.  If necessary, create a small filter program that splits dump file
lines such that one field appears on each line but processing the file
for database restoration still works as expected.

3.  Create a permanent CVS sandbox, make the first MySQL dump, and
commit it.

4.  On a fixed schedule, dump the database into the same file,
replacing the file, and commit the update.

5.  On another fixed schedule, use `cvs admin' to delete old

6.  In case of emergency, restore the database to any saved state by
checking out the appropriate dump and rebuilding the database with it.

This will obviously produce huge deltas if an ALTER TABLE command is
used, but it seems sound in all other respects to me.

Doug Lee                 address@hidden        
SSB + BART Group         address@hidden
Freedom is not the ability to have what we want.  Freedom is merely the
ability to seek it.  To be free defines what we can do, not what we can get.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]