Class Backup::Database::MongoDB
In: lib/backup/database/mongodb.rb
Parent: Base

Methods

new   perform!  

Attributes

additional_options  [RW]  Additional "mongodump" options
host  [RW]  Connectivity options
ipv6  [RW]  IPv6 support (disabled by default)
lock  [RW]  ‘lock’ dump meaning wrapping mongodump with fsync & lock
mongo_utility  [RW]  Path to the mongo utility (optional)
mongodump_utility  [RW]  Path to the mongodump utility (optional)
name  [RW]  Name of the database that needs to get dumped
only_collections  [RW]  Collections to dump, collections that aren‘t specified won‘t get dumped
password  [RW]  Credentials for the specified database
port  [RW]  Connectivity options
username  [RW]  Credentials for the specified database

Public Class methods

Creates a new instance of the MongoDB database object

Public Instance methods

Performs the mongodump command and outputs the data to the specified path based on the ‘trigger’. If the user hasn‘t specified any specific collections to dump, it‘ll dump everything. If the user has specified collections to dump, it‘ll loop through the array of collections and invoke the ‘mongodump’ command once per collection

[Validate]