[LRUG] Migrating SQLlite to MySQL
Matthew Rudy Jacobs
matthewrudyjacobs at gmail.com
Mon Nov 16 05:06:05 PST 2009
I assume what you want to do is;
- tag your current code with the database.yml pointing to sqlite
- make the necessary changes to point to your mysql instance
- tag this version of the code
- put up a maintenance page (make apache or nginx return 503 status code,
and say "please be patient. we're busy making blahblah.com better. see
you in a moment" - capistrano can do most of this for you)
- dump your sqlite database ("sqlite3 db/production.sqlite3 '.dump' >
dbdump.sql")
- load this into your mysql ("mysql my_database_production < dbdump.sql")
- now redeploy your code with the mysql tag of your code
- restart your server
- take down the maintenance page.
2009/11/16 Alexander Bienz <abienz at gmail.com>
> Hello folks,
>
> I've been managing a personal priject on the Rails 2 framework for a year
> or so, and I initially left the production Database as SQLlite, as I wanted
> to see how it would perform.
>
> I would now like to use a MySQL database, as is typical for most Rails
> webapps, but I want the changeover to be seamless, I don't want to lose any
> data or connections.
>
> Can anyone point me in the direction of the best practice for this kind of
> migration?
>
> Any tips would be appreciated.
>
> Cheers,
>
> Alex.
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20091116/49d91f8e/attachment-0003.html>
More information about the Chat
mailing list