Ruby and MySQL backup

0 views
Skip to first unread message

PeteSalty

unread,
Oct 14, 2008, 1:55:18 PM10/14/08
to Ruby on Rails: Talk
I suspect this is not exactly a Ruby/Rails topic but I also suspect
that lots of people here have already solved this issue. We have a
simple app running on a SliceHost slice and we'd like to backup the
database both hourly and daily to an AWS S3 account.
I've looked around but surprisingly can't seem to find anything that
offers a complete solution for doing this. I was hoping to find a ruby
solution but so far nothing. I suspect that it's not a super hard
thing to do but it's not really my specialty so I was hoping someone
here might simply point me in the right direction - perhaps a blog
post or something similar.

Dale

Roger Pack

unread,
Oct 15, 2008, 1:51:37 AM10/15/08
to rubyonra...@googlegroups.com

You could setup a cron job to do it as you mentioned [mysqldump]. You
could try a mysql table syncer
http://code.google.com/p/ruby-roger-useful-functions/wiki/TableSyncer
Cheers.
-=r
--
Posted via http://www.ruby-forum.com/.

Christian Johansen

unread,
Oct 15, 2008, 5:18:43 AM10/15/08
to rubyonra...@googlegroups.com
I always use automysqlbackup
(http://sourceforge.net/projects/automysqlbackup/). It's not ruby, but
it's damn fine for backing up MySQL especially if you need to backup
several databases on the same server.

Peter De Berdt

unread,
Oct 16, 2008, 3:59:20 AM10/16/08
to rubyonra...@googlegroups.com

On 15 Oct 2008, at 11:18, Christian Johansen wrote:

I always use automysqlbackup 
(http://sourceforge.net/projects/automysqlbackup/). It's not ruby, but 
it's damn fine for backing up MySQL especially if you need to backup 
several databases on the same server.

I use my own bash Shell script. It commits all the database dumps to a git repository and then pushes it to a central repository (but the script could just as easily be modified to use svn or mercurial or ...). That way you have versioned backups both on the local machine as on a remote host (or hosts even) going back as far as you want. Then just let a cron take care of executing the script as frequently as you want.



Best regards


Peter De Berdt


Save The Vinyls

unread,
Nov 14, 2008, 7:52:28 AM11/14/08
to Ruby on Rails: Talk
Thanks a lot Peter!
Reply all
Reply to author
Forward
0 new messages