Giter Club home page Giter Club logo

ammongodb's Introduction

ammongodb

This is a plugin script which allows AMANDA to back up a Mongo Database. To maintain the integrity of the backup, when performed on a running database, this should only be used on a read-only reporting node.

Sources

Usage

This script will be called by the AMANDA plugin API, snd should not be invoked directly. The configuration file "amanda.conf" defines the input arguments in the "script-tool" and "dumptype" sections.

For example,

define script-tool script-dump-mongo-replica {
    comment "Execute mongodump script"
    plugin "ammongodb"
    execute-where client
    execute-on pre-dle-backup, post-dle-backup
    property "port" "27018"
    property "auth" "/var/mongo/auth/mongo_backup_auth.cfg"
    property "log" "/var/logs/mongo/mongo-amanda.log"
}

define dumptype dump-mongo-replica {
    comp-user-tar
    comment "Mongo Dump"
    script "script-dump-mongo-replica"
    auth "bsdtcp"
} 

Will execute this command, as seen in the amada sendbackup log file:

/usr/libexec/amanda/application/ammongodb ammongodb POST-DLE-BACKUP \ 
    --execute-where client --config DailyBackup --host example.domain.net \
    --disk /var/mongo/dump --device /var/mongo/dump --level 0 --port 27018 \
    --auth /var/mongo/auth/mongo_backup_auth.cfg --log /var/log/mongo/mongo-amanda.log"

Options

Most of the options are self-explanatory to users of Mongo.

  • port: which the Mongo daemon listens on (standard for standalone is 27017; replica node, 27018)

  • auth: file containing authentication credentials for the backup user, of the form:

    USER= PASSWORD=

The AMANDA "execute-on" key will take several values, but the ammongodb script will only recognise two:

  • pre-dle-backup: execute the mongodump command, dumping to the disk subdirectory mongo-backup-dump, backing up this directory to the AMANDA datastore.
  • post-dle-backup: delete the mongo-backup-dump subdirectory
  • log: file containing the backup script output; logs are also to be found in /var/log/amanda/client/Config/sendbackup*.

ammongodb's People

Contributors

matthewparsons avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

doctorogg

ammongodb's Issues

There appears to be a conflict header checked into HEAD?

When I look at the script file, there appear to be commit headers embedded in the script, along with various duplicated lines.

I'm not entirely familiar with GIT but I think I can manually fix a copy. I'm sure it's enough to discourage non-GIT users fro doing anything with it, though.

Could you possibly commit a fresh, intact copy of the script to your repo?

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.