Mongorestore using knife
This post is a continuation to my post Taking a Mongodump using Knife . Keeping the assumptions the same as the previous post, this post outlines a knife plugin to restore your mongo database from a dump taken as above. module KnifePlugins class MongoDumpApply < Chef::Knife banner 'knife mongo dump apply' option :db_env, :long => '--db-env DB_ENV', :description => 'Environment to apply the dump to' option :dump_dir, :long => '--dump-dir DUMP_DIR', :description => 'Full path to dump location' deps do require 'chef/search/query' end def run @dump_dir = config[:dump_dir] @env = config[:db_env] if !vali...