mongo

command
v0.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

The `mongo` plugin for SHIELD implements generic backup + restore functionality for mongodb. It can be used against mongodb server with `mongodump` and `mongorestore` tools installed on the system where this plugin is run.

PLUGIN FEATURES

This plugin implements functionality suitable for use with the following SHIELD Job components:

Target: yes
Store:  no

PLUGIN CONFIGURATION

The endpoint configuration passed to this plugin is used to identify what mongodb instance to back up, and how to connect to it. Your endpoint JSON should look something like this:

{
    "mongo_host"     : "127.0.0.1",   # optional
    "mongo_port"     : "27017",       # optional
    "mongo_user"     : "username",    # optional
    "mongo_password" : "password",    # optional
    "mongo_database" : "db",          # optional
    "mongo_bindir"   : "/path/to/bin" # optional
}

Default Configuration

{
    "mongo_host"        : "127.0.0.1",
    "DefaultPort"       : "27017",
    "DefaultMongoBinDir": "/var/vcap/packages/shield-mongo/bin"
}

BACKUP DETAILS

If `mongo_database` is specified in the plugin configuration, the `mongo` plugin backs up ONLY the specified database using `mongodump` command. If `mongo_database` is not specified, all databases are backed up.

Backing up with the `mongo` plugin will not drop any existing connections to the database, or restart the service.

RESTORE DETAILS

To restore, the `mongo` plugin connects to the mongodb server using the `mongorestore` command. It then feeds in the backup data (`mongodump` output). Unlike the the `postgres` plugin, this plugin does NOT need to disconnect any open connections to mongodb to perform the restoration.

Restoring with the `mongo` plugin should not interrupt established connections to the service.

DEPENDENCIES

This plugin relies on the `mongodump` and `mongorestore` utilities. Please ensure that they are present on the system that will be running the backups + restores for mongodb. TODO: add agent-mongodb job template to shield-boshrelease If you are using shield-boshrelease to deploy SHIELD, these tools are provided so long as you include the `agent-mongodb` job template along side your `shield agent`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL