Giter Club home page Giter Club logo

moonshine_omnipitr's Introduction

Moonshine::Omnipitr

Introduction

Welcome to Moonshine::Omnipitr, a Moonshine plugin for installing and managing OmniPITR. This plugin installs and configures OmniPITR on the PostgreSQL slave. It configures a cron job to backup the database daily and uploads the backup to Amazon S3.

Here's some quick links:

Quick Start

Moonshine::Omnipitr is installed as a Rails plugin:

# Rails 2.x.x
script/plugin install git://github.com/railsmachine/moonshine_omnipitr.git
# Rails 3.x.x
script/rails plugin install git://github.com/railsmachine/moonshine_omnipitr.git

Once it's installed, you can include it in your manifest:

# app/manifests/database_manifest.rb
class DatabaseManifest < Moonshine::Manifest:Rails

  include Moonshine::Omnipitr

  # other recipes and configuration omitted

  # tell DatabaseManifest to use the omnipitr recipe
  # omnipitr should only be setup on the slave database server
  if Facter.hostname =~ /^db2/
    recipe :omnipitr
  end
end

Moonshine::Omnipitr requires your S3 bucket, access key, and secret key so that it can upload the backup files to S3.

Configuration Options

Here's some other omnipitr configuration options you may be interested in.

  • :s3_bucket: the S3 bucket to store backups
  • :s3_prefix: an optional prefix to prepend to backup files (allows backups to be store in a subdirectory of the bucket)
  • :s3_key: your S3 access key
  • :s3_secret: your S3 secret key

These are namespaced under :omnipitr. They can be configured a few ways:

# in global config/moonshine.yml
:omnipitr:
  :s3_bucket: 'your-bucket'
  :s3_prefix: 'backups/'
  :s3_key: 'YOUR_ACCESS_KEY'
  :s3_secret: 'YOUR_SECRET_KEY'

# in stage-specific moonshine.yml,
# config/moonshine/staging.yml and config/moonshine/production.yml
:omnipitr:
  :s3_bucket: 'your-bucket'
  :s3_prefix: 'backups/'
  :s3_key: 'YOUR_ACCESS_KEY'
  :s3_secret: 'YOUR_SECRET_KEY'

# `configure` call in app/manifests/database_manifest.rb
configure :omnipitr => {
  :s3_bucket => 'your-bucket',
  :s3_prefix => 'backups/',
  :s3_key    => 'YOUR_ACCESS_KEY',
  :s3_secret => 'YOUR_SECRET_KEY'
}

Unless otherwise specified, all content copyright © 2014, Rails Machine, LLC

moonshine_omnipitr's People

Contributors

kplawver avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.