Giter Club home page Giter Club logo

ec2-consistent-snapshot-postgres's Introduction

***WARNING***: This command is not finished nor working right now, it was a proof of concept so don't expect it to even work...

NAME
    ec2-consistent-snapshot-postgres - Create EBS snapshots on EC2 w/consistent
    filesystem/db

SYNOPSIS
     ec2-consistent-snapshot-postgres [opts]...

OPTIONS
    -h, --help
        Print help and exit.

    -l, --lock=LOCKFILE
        The lock file to use to prevent multiple executions.
        Default: "/var/lock/ec2-consistent-snapshot-postgres.lock"

    --disable-backup-file=DISABLEBACKUPFILE
        If this file exists the backups will be disabled. It's useful while
        doing migrations or maintainment tasks so you don't need to disable
        cron jobs, just touch that file and backups will be disabled.
        Default: "/var/tmp/ec2-consistent-snapshot-postgres.disabled"

    -e, --expire=HOURS
        The number of hours this snapshot will be valid. After the given
        number of hours, the snapshot will be purged.
        Default: 0

    -d, --ebs-devices=DEVICESLIST
        A list of device names to take a snapshot for.

    -r, --region=REGION
        The AWS region to work.
        Default: "es-west-1".

    --description=DESCRIPTION
        Specify a description string for the EBS snapshot.
        Default: ec2-consistent-snapshot-postgres

    --freeze-filesystem=MOUNTPOINT
        Indicates that the filesystem at the specified mount point should be
        flushed and frozen during the snapshot. Requires the fsfreeze program.
        fsfreeze comes with newer versions of util-linux.

    --snapshot-timeout=SECONDS
        How many seconds to wait for the snapshot-create to return.
        Default: 10.0

    --lock-timeout=SECONDS
        How many seconds to wait for a database lock.
        Making this too large can force other processes to wait while this
        process waits for a lock. Better to make it small and try lots of
        times.
        Default: 0.5.

    --lock-tries=COUNT
        How many times to try to get a database lock before failing.
        Default: 60.

    --lock-sleep=SECONDS
        How many seconds to sleep between database lock tries.
        Default: 5.0.

    --max-load=LOAD
        The maximum load the system should have to start the backup.
        Default: 2.0.

    --max-load-tries=COUNT
        How many times to try to start a backup when the load is higher than
        the given limit. Each try increases 5 minutes of delay. For instance,
        first retry will wait 5 minutes, second retry will wait for 10 minutes,
        third retry will wait for 15 minutes and so on.
        Default: 6.

    -v, --verbose
        Increase log output verbosity.

    --log-file=LOGFILE
        The log file.

    --snapshot-domain=NAME
        The domain where all snapshots will be grouped in SDB.
        Default: ec2-consistent-snapshot-postgres

    -p --purge
        Whether all available snapshots must be purged.
        WARNING: This is a destructive option only useful to clean all
        snapshots not valid anymore.
        Default: False


DESCRIPTION
    This program creates an EBS snapshot for an Amazon EC2 EBS volume. To
    help ensure consistent data in the snapshot, it tries to flush and
    freeze the filesystem(s) first as well as flushing and locking the
    database.

    Filesystems can be frozen during the snapshot. While frozen, a
    filesystem will be consistent on disk and all writes will block.

    There are a number of timeouts to reduce the risk of interfering with
    the normal database operation while improving the chances of getting a
    consistent snapshot.

    If you have multiple EBS volumes in a RAID configuration, you can
    specify all of the devices on the command line and it will create
    snapshots for each while the filesystem and database are locked. Note
    that it is your responsibility to keep track of the resulting snapshot
    ids and to figure out how to put these back together when you need to
    restore the RAID setup.

    If you have multiple EBS volumes which are hosting different file
    systems, it might be better to simply run the command once for each
    device.


INSTALLATION
    To install this program you need to configure the boto library with your
    AWS credentials at /etc/boto.cfg as described at
    http://code.google.com/p/boto/wiki/BotoConfig

CREDITS
    Eric Hammond <[email protected]> for the original perl implementation
    for MySQL.

AUTHOR
    Carlos Perello Marin <[email protected]>

LICENSE
    Copyright (c) 2013 Carlos Perello Marin <[email protected]>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>

ec2-consistent-snapshot-postgres's People

Contributors

carlosperello avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dmreiland

ec2-consistent-snapshot-postgres's Issues

What is incomplete?

The README says the script is incomplete. What does the author feels is lacking? I'm willing to contribute (as I need this functionality) if I can get a list of what the author feels is missing.

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.