Search code examples
ruby-on-rails-3archive

how to archive all tables from mysql to sqlite in rails 3


Is there an automated way in rails 3 to archive all the data in my production db (MySQL) into another database (sqlite3)?

Background: I want to save away all of last years data that we don't need quick access to, and then clear out the database so its fresh and will only hold the data of an upcoming project. Thanks.


Solution

  • Check out the taps gem. Also take a look at the recent railscasts

    http://railscasts.com/episodes/342-migrating-to-postgresql

    That episode shows how to use taps to move data between databases.