Sha256: ad3eda832bc79d95f27022e30b7baca952e17eee3c8c632cb75868d3c2ab5dba

Contents?: true

Size: 1.32 KB

Versions: 6

Compression:

Stored size: 1.32 KB

Contents

module Mongoid
  module Shell
    module Commands
      class Mongorestore < Mongoid::Shell::Commands::Base
        include Mongoid::Shell::Properties::Primary
        include Mongoid::Shell::Properties::Database
        include Mongoid::Shell::Properties::Username
        include Mongoid::Shell::Properties::Password

        attr_accessor :host, :collection, :ipv6, :dbpath, :directoryperdb, :journal, :objcheck, :filter, :drop, :oplogReplay, :keepIndexVersion, :noIndexRestore, :restore

        def initialize(attrs = {})
          super
        end

        def host
          @host || primary
        end

        def vargs
          super({
            '--host' => :host,
            '--db' => :db,
            '--username' => :username,
            '--password' => :password,
            '--collection' => :collection,
            '--ipv6' => :ipv6,
            '--dbpath' => :dbpath,
            '--directoryperdb' => :directoryperdb,
            '--journal' => :journal,
            '--objcheck' => :objcheck,
            '--filter' => :filter,
            '--drop' => :drop,
            '--oplogReplay' => :oplogReplay,
            '--keepIndexVersion' => :keepIndexVersion,
            '--noIndexRestore' => :noIndexRestore,
            'directory or filename to restore from' => :restore
          })
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongoid-shell-0.4.4 lib/mongoid/shell/commands/mongorestore.rb
mongoid-shell-0.4.3 lib/mongoid/shell/commands/mongorestore.rb
mongoid-shell-0.4.2 lib/mongoid/shell/commands/mongorestore.rb
mongoid-shell-0.4.1 lib/mongoid/shell/commands/mongorestore.rb
mongoid-shell-0.4.0 lib/mongoid/shell/commands/mongorestore.rb
mongoid-shell-0.3.0 lib/mongoid/shell/commands/mongorestore.rb