Mongorestore Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora And Raspbian
Install mongorestore
-
Debian
apt-get install mongo-toolsClick to copy -
Ubuntu
apt-get install mongo-toolsClick to copy -
Alpine OS
apk add mongodb-toolsClick to copy -
Arch Linux
pacman -S mongodb-toolsClick to copy -
Kali Linux
apt-get install mongo-toolsClick to copy -
Fedora
dnf install mongo-toolsClick to copy -
Raspbian
apt-get install mongo-toolsClick to copy
Utility to import a collection or database from a binary dump into a MongoDB instance.
How to use mongorestore?
Below are few example commands for mongorestore that you can use in the terminal.
Import a bson data dump from a folder to a MongoDB database:mongorestore --db database_name path/to/folderClick to copyImport a bson data dump from a folder to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password):mongorestore --host database_host:port --db database_name --username username path/to/folder --passwordClick to copyImport a collection from a bson file to a MongoDB database:mongorestore --db database_name path/to/fileClick to copyImport a collection from a bson file to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password):mongorestore --host database_host:port --db database_name --username username path/to/file --passwordClick to copy
Install the latest version of mongorestore in Debian, Ubuntu, Alpine, Arch, Kali, Fedora and Raspbian from terminal. To install the mongorestore just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of mongorestore from the respository and install it in your computer/server.




