Skip to content

mokuo/rails_mysqldump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RailsMysqldump

rails_mysqldump run mysqldump in a Rails project.

Installation

Add this line to your application's Gemfile:

gem 'rails_mysqldump'

And then execute:

$ bundle install --path vendor/bundle

or

$ bundle install

Usage

$ bin/rails c
> RailsMysqldump.run

Then, for example, tmp/mysqldump/development_20171102133556.dump file is generated.

When production environment:

$ bin/rails c -e production
> RailsMysqldump.run

Then, for example, tmp/mysqldump/production_20171102133556.dump file is generated.

By default, it is output to tmp/mysqldump .

If you want to output to another directory, execute:

RailsMysqldump.run('path/to/dump')

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mokuo/rails_mysqldump.

About

Run mysqldump in the Rails project

Resources

Stars

Watchers

Forks

Packages

No packages published