MongoDB.live, free & fully virtual. June 9th - 10th. Register Now MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

Restore database in version 2.9

please advice how can i restore database into a new database.

@Lital_ez Welcome to the forums! Can you please clarify the specific versions of MongoDB server you are trying to restore from and to? There is no MongoDB 2.9 server release, and the oldest version of the server that isn’t currently end-of-life is the 3.6 release series.

The general approach for backing up and restoring a single database is using mongodump and mongorestore as per Back Up and Restore with MongoDB Tools.

Regards,
Stennie

ops, version 3.2.9 restore database from gz archive into different database on the same server

The options you are looking for are:
-d / --db for the database to restore into.
--gzip For the gz
--archive For the archive format

Example on the mongorestore documentation.