Build Status Maintainability Test Coverage

Dumpman

Dumpman gem is what you need if you have application somewhere and need to dump your DB download it and up that dump localy!

alt text

Installation

Add this line to your application's Gemfile:

gem 'dumpman', git: '[email protected]:skcc321/dumpman.git'

Then execute:

$ bundle

Or install it yourself as:

$ gem install dumpman

Generate default config:

$ rails g dumpman

it will create file app/config/initializers/dumpman.rb

Dumpman.setup do
  # dump file name
  dump_file_name "dumpman.sql"

  # :prod is uniq connection name
  define_source :prod do
    # application environment (RAILS_ENV)
    app_env 'production'

    # ssh command for connection to the remote server
    ssh_cmd '[email protected]'

    # ssh options for connection to the remote server
    # example:
    # ssh_opts '-i ~/.ssh/sertificate.pem'

    # app path on the remote server
    app_path '~/application/current'
  end
end

Update app/config/initializers/dumpman.rb with propper settings.

Usage

Now you are able to use awesome commands:

$ rake db:prod:up
$ rake db:stage:up
$ rake db:qa:up
...

Contributing

Bug reports and pull requests are welcome!

License

The gem is available as open source under the terms of the MIT License.