Backup your Rails DB
Backup your rails application database data using this gem. (rails-backup-migrate)
https://github.com/mattconnolly/rails-backup-migrate
Add this to your GemFile and Do a 'bundle install'
gem 'rails-backup-migrate'
or do a
gem install rails-backup-migrate
And to backup your data use
rake site:backup
It creates a .tgz backup of your DB data with schema of your app.
Then to restore to some other Rails Application, move your .tgz file to the directory of your rails app and do
rake site:restore
That's it.
Happy Hacking ....
Written by Rajeev N Bharshetty
Related protips
1 Response
if somebody looking for simple solution for backups: https://github.com/kirillshevch/pg_drive_backup
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#