I am working on backup recovery for MongoDB 3.4. We have an instance that is running and being used. I set up a instance for doing testing of the backup and recovery process. In order to get data I did mongodump for each database and copied the files to my test server. Each backup write files to a directory that has the same name as the database. I used the gzip option to make it easier to move the files around. I am having issues trying to do the mongorestore. Can someone give me the syntax for mongorestore?
Here is the dump command mongodump –port 27017 –authenticationDatabase admin -u my_admin_user -p password -o /backup_dir –gzip -d test_db
These are the directories with the contents of my_test_db
root@my_vm:~/mongodb_backup_full_data_dump > ls -l total 20 drwxr-xr-x. 2 root root 4096 Aug 24 13:30 admin drwxr-xr-x. 2 root root 4096 Aug 24 13:51 data1 drwxr-xr-x. 2 root root 4096 Aug 24 14:20 data2 drwxr-xr-x. 2 root root 4096 Aug 24 14:20 data3 drwxr-xr-x. 2 root root 4096 Aug 24 14:20 my_test_db root@my_vm:~/mongodb_backup_full_data_dump > ls -l ./my_test_db/* -rw-r--r--. 1 root root 24263 Aug 24 14:20 ./my_test_db/journal_entries.bson.gz -rw-r--r--. 1 root root 132 Aug 24 14:20 ./my_test_db/journal_entries.metadata.json.gz -rw-r--r--. 1 root root 481 Aug 24 14:20 ./my_test_db/journal_users.bson.gz -rw-r--r--. 1 root root 107 Aug 24 14:20 ./my_test_db/journal_users.metadata.json.gz -rw-r--r--. 1 root root 14438174 Aug 24 14:20 ./my_test_db/test_collection.bson.gz -rw-r--r--. 1 root root 104 Aug 24 14:20 ./my_test_db/test_collection.metadata.json.gz mongorestore --port 27017 --authenticationDatabase admin -u my_admin_user -p password -o /backup_dir \ --gzip -d test_db /root/mongodb_backup_full_data_dump/test_db/journal_entries.bson.gz 2017-08-25T15:24:05.487-0400 the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead 2017-08-25T15:24:05.487-0400 checking for collection data in /root/mongodb_backup_full_data_dump/mediax 2017-08-25T15:24:05.487-0400 Failed: error scanning filesystem: file /root/mongodb_backup_full_data_dump/mediax is a directory, not a bson file
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!