Methods

Class/Module Index [+]

Quicksearch

Backup::Database::MongoDB

Attributes

additional_options[RW]

Additional “mongodump” options

host[RW]

Connectivity options

ipv6[RW]

IPv6 support (disabled by default)

lock[RW]

Forces mongod to flush all pending write operations to the disk and locks the entire mongod instance to prevent additional writes until the dump is complete.

Note that if Profiling is enabled, this will disable it and will not re-enable it after the dump is complete.

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

oplog[RW]

Creates a dump of the database that includes an oplog, to create a point-in-time snapshot of the state of a mongod instance.

If this option is used, you would not use the `lock` option.

This will only work against nodes that maintain a oplog. This includes all members of a replica set, as well as master nodes in master/slave replication deployments.

password[RW]

Credentials for the specified database

port[RW]

Connectivity options

username[RW]

Credentials for the specified database

Public Class Methods

new(model, database_id = nil, &block) click to toggle source
# File lib/backup/database/mongodb.rb, line 51
def initialize(model, database_id = nil, &block)
  super
  instance_eval(&block) if block_given?
end

Public Instance Methods

perform!() click to toggle source
# File lib/backup/database/mongodb.rb, line 56
def perform!
  super

  lock_database if @lock
  dump!
  package!

ensure
  unlock_database if @lock
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.