Module: MongoUtils::MongoRestore
- Defined in:
- lib/mongo_utils/mongo_restore.rb
Class Method Summary collapse
Class Method Details
.call(options) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/mongo_utils/mongo_restore.rb', line 3 def self.call() cmd = %{ mongorestore --host #{Mongoid.respond_to?(:database) ? Mongoid.database.connection.primary.join(':') : Mongoid.sessions['default']['hosts'][0]} --filter "#{[:filter]}" #{[:path]} }.squish `#{cmd}` end |