Repository is archived
No commit activity in last 3 years
No release in over 3 years
Add rake db:dump, rake db:restore and cap db:pull
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

< 5.0, >= 3.2
< 5.0, >= 3.2
 Project Readme

gem install rails_db_dump_restore

rake tasks

# Dump database to tmp/database.dump
rake db:dump
# development database dumped to tmp/database.dump

# Replace database with contents of tmp/database.dump
rake db:restore
# development database replaced with contents of tmp/database.dump

capistrano tasks

# Replace local database with a remote one
cap production db:pull
# Dumps production database to remote tmp/database.dump
# Downloads the dumpfile to local tmp/database.dump
# Replaces local database with contents of tmp/database.dump

Add require 'capistrano/rails_db_dump_restore' to your Capfile

Quirks

Only works with postgresql and mysql2 database adapters as of now. You should add support for others.

Dummy

We have a dummy app in another repo that is used for testing out this gem Make sure to clone it beside the gem repo

cd ..
git clone git@github.com:standout/rails_db_dump_restore_dummy
cd rails_db_dump_restore_dummy
bundle
rake dummy