is a gem for rails apps that adds to rake db tasks. The command rake db:csv_to_db pushes csv content to a db table and the command rake db:db_to_csv pulls a database table into a csv
gem install csv_db
If you have a table you want to backup into a csv in the rails db with a model: Model
just call: rake db:csv_to_db model=Model
the call writes into a csv file Model.csv located in the app root directory
If you have data you want to push from a csv in the rails db with a model: Model
just call: rake db:db_to_csv csv=Model
the call reads from a csv file Model.csv located in the app root directory
the top row of the csv should be the column names delimited by commas
remember to place files in the right place. also primary keys cannot be written.