[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: MySQL changes into svn

From: Chris Albertson <albertson.chris_at_gmail.com>
Date: Mon, 28 Feb 2011 12:35:26 -0800

>>> Whenever I change my MySQL database, I do then manually run a script that
>>> saves the schema to a file, then I commit that file to my Subversion
>>> repository. I try to limit myself to one database change at a time, so
>>> that I can write reasonable commit messages.
>> I am wondering the same thing, how to automate database backup. There is a
>> tool in Linux for automatic database backup, but it seems quite buggy. I have
>> been able to backup my databases using a bash script and a pre commit hook
>> could be the next thing to do, but still no automation there.
> Subversion is not a backup system.

Perfectly OK the place a __schema__ in SVN. But it is not reasonable
to use SVN to store the content of a database.

Most every SQL database I've seen has a "dump" command that will dump
content to an ASCII file. Then you save the files the same way you'd
save any other files. You __do__ have to do the dumps inside a
transaction so to maintain consistency.

Chris Albertson
Redondo Beach, California
Received on 2011-02-28 21:35:58 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.