Project

duple

0.0
No commit activity in last 3 years
No release in over 3 years
Duple simplifies moving and processing data snapshots between development, testing and production environements.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.3.0
~> 0.9.2
~> 2.11.0
~> 1.1.3
~> 0.7.1

Runtime

>= 0
 Project Readme

Duple

Code Climate Build Status

Duple makes it easy to move PostgreSQL data around between your deployment environments. Duple knows how to move data from one heroku environment to another and how to load it into your local database. It can execute rake or Heroku commands before and after your loading data into your target environment. This is great for scrubbing, replacing, trimming or generating data for your test environments.

Installation

Install the gem:

$ gem install duple

Generate a config file:

$ duple init

Configuration

The generated config file contains samples of all the different ways you can figure the application. Read and modify it, or clear it out and write your own.

Usage

# Resets the stage database
# Loads the latest production snapshot into the stage database
$ duple refresh -s production -t stage

# Downloads the latest full snapshot from production
# Resets the development database
# Loads the snapshot into the development database
$ duple refresh -s production -t development

# Captures a new production database snapshot
# Downloads the latest full snapshot from production
# Resets the development database
# Loads the snapshot into the development database
$ duple refresh -s production -t development --capture

# Downloads the schema and a subset of data from stage
# Resets the backstage database
# Loads the structure and the subset into the backstage database
$ duple refresh -s stage -t backstage --group minimal

# Downloads the data from the specified tables from the stage database
# Loads the data into the backstage database
$ duple copy -s stage -t backstage --tables products categories

Future

  • Custom error classes.

  • Improve documentation

  • Support non-Heroku remote PostgreSQL servers.

  • Move knowledge of endpoint types out of Thor tasks.

  • Support for skipping pre- and post- refresh steps.

  • Support for running pre- and post- refresh steps by themselves.

  • Support for other data stores.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request