Skip to content
Adds a handy script/dbdump command to your Rails app.
Ruby
Failed to load latest commit information.
bin fix ruby 2 not having . in LOAD_PATH Jul 6, 2013
lib fix ruby 2 not having . in LOAD_PATH Jul 6, 2013
MIT-LICENSE updated copyright line in license file Feb 17, 2009
README updated copyright, added note about branch for rails 2.3. Jan 8, 2011
Rakefile set up as a gem binary. this is less convenient to use since you have… Aug 18, 2012
dbdump_command.gemspec
install.rb set up as a gem binary. this is less convenient to use since you have… Aug 18, 2012
uninstall.rb use Rails.root instead of RAILS_ROOT Jan 8, 2011

README

DbdumpCommand
=============

This plugin adds a script/dbdump command which dumps your Rails database out.

This master branch supports Rails 3.0.  For Rails 2.3, use the rails_2_3 branch.

Like script/dbconsole, it takes your database connection details from
config/database.yml, and supports mysql, postgresql, and sqlite.

It takes the same options as script/dbconsole, ie. -p to supply the password
to your dump program for mysql and postgresql.   (Note that for mysql, this
means that the password is visible when other users on the system run 'ps'.
Postgresql does not have this problem as it uses an environment variable set
in ENV before execing and so not visible in ps.)


Example
=======

RAILS_ENV=production script/dbdump -p >mysite_production_`date +%Y-%m-%d`
  - dumps your production database to a file named like mysite_production_2009-01-27.


Copyright (c) 2009-2011 Will Bryant, Sekuda Ltd, released under the MIT license
Something went wrong with that request. Please try again.