Module: Mongodump::Restore
- Defined in:
- lib/mongodump/restore.rb
Constant Summary collapse
- @@restore_command =
"mongorestore"
Class Method Summary collapse
-
.process(path) ⇒ Object
Restore the mongo database - path <String> - appname <String>.
Class Method Details
.process(path) ⇒ Object
Restore the mongo database
-
path <String>
-
appname <String>
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/mongodump/restore.rb', line 8 def self.process(path) cmd = @@restore_command cmd << " -h localhost" cmd << " #{path} " Display.info("Restoring mongo database...") Display.info(cmd) # Execute cmd system(cmd) Display.success("Restoration OK.") end |