Socket
Book a DemoInstallSign in
Socket

mongodb_clone

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb_clone

0.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

MongodbClone Build Status Dependency Status Gem Version

Code Climate Coverage Status

Dump and restore databases easily.

Backup and Restoration Strategies & MongoDB Manual

Installation

Add this line to your application's Gemfile:

gem 'mongodb_clone'

And then execute:

$ bundle

Usage

Use a rake task to dump production database and restore locally.

$ rake db:copy:production:to_local

or create your tasks:

# Dump environment "staging", session "default" and restore in "development" environment, session "backup"
MongodbClone::MongodbReplication.new.dump('staging').restore('development', 'backup')

Use config/mongoid.yml to configure the environments:

development:
  sessions:
    default:
      database: mongodb_clone_development
      hosts:
        - localhost:27017
    backup:
      database: mongodb_clone_development
      hosts:
        - localhost:27017

staging:
  sessions:
    default:
      database: mongodb_clone_staging
      username: mongodb_clone
      password: 12345678
      hosts:
        - mongodb_clone_staging.example.com:27017

production:
  sessions:
    default:
      database: mongodb_clone_production
      username: mongodb_clone
      password: 12345678
      hosts:
        - mongodb_clone.example.com:27017

Contributing

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

License

MIT License. Copyright 2012 Tiago Rafael Godinho

FAQs

Package last updated on 25 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.