You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Cecil Westerhof <Ce...@decebal.nl> on 2011/02/28 20:27:54 UTC

MySQL changes into svn

I am just asked if it is possible to put the changes of MySQL
databases in svn. I could of-course export the table definitions and
store those in svn. I was just wondering if there is a better way?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Re: MySQL changes into svn

Posted by Chris Albertson <al...@gmail.com>.
>>> 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

Re: MySQL changes into svn

Posted by Andy Levy <an...@gmail.com>.
On Mon, Feb 28, 2011 at 14:35, Bogdan Cristea <cr...@gmail.com> wrote:
> On Monday 28 February 2011 20:31:22 Ryan Schmidt wrote:
>> On Feb 28, 2011, at 13:27, Cecil Westerhof wrote:
>> > I am just asked if it is possible to put the changes of MySQL
>> > databases in svn. I could of-course export the table definitions and
>> > store those in svn. I was just wondering if there is a better way?
>>
>> If you're looking for something automated, that's probably a pretty
>> complicated topic.
>>
>> 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.

Re: MySQL changes into svn

Posted by Bogdan Cristea <cr...@gmail.com>.
On Monday 28 February 2011 20:31:22 Ryan Schmidt wrote:
> On Feb 28, 2011, at 13:27, Cecil Westerhof wrote:
> > I am just asked if it is possible to put the changes of MySQL
> > databases in svn. I could of-course export the table definitions and
> > store those in svn. I was just wondering if there is a better way?
> 
> If you're looking for something automated, that's probably a pretty
> complicated topic.
> 
> 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.

regards
-- 
Bogdan Cristea
http://cristeab.googlepages.com

Re: MySQL changes into svn

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 28, 2011, at 13:27, Cecil Westerhof wrote:

> I am just asked if it is possible to put the changes of MySQL
> databases in svn. I could of-course export the table definitions and
> store those in svn. I was just wondering if there is a better way?

If you're looking for something automated, that's probably a pretty complicated topic.

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.