Project

backhoe

0.0
A long-lived project that still receives updates
Dump and load current database to and from a file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
~> 3.0
>= 0
>= 0

Runtime

 Project Readme

Backhoe

CI Status

Dump and load current ActiveRecord database to and from a file.

Usage

# Dump
Backhoe.dump "data.sql" # dumps db to db/data.sql
Backhoe.dump "data.sql.gz" # => can also dump a gzipped sql file
Backhoe.dump "data.sql", skip_tables: [:comments], skip_columns: { users: [:password] } # can skip whole tables or just specific columns

# Load
Backhoe.load "data.sql" # loads db from db/data.sql
Backhoe.load "data.sql.gz" # => can also load a gzipped sql file
Backhoe.load "data.sql", drop_and_create: true # injects DROP and CREATE statements into the SQL invocation

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

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

License

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