Many a time there are required to create a new collection from existing ones with the same or different size. In this blog, we will see how to create a new collection from the existing one and with a smaller size.
For Sample data, We may use Kaggle to get huge data set. In my collection, I have a total of 27414622 records. My objective is to create a new collection with a 40% size of the existing collection.
MongoDB Enterprise > db.subreddits.count()
27414622
MongoDB Enterprise >
40% of record size would be 10965848 so we have to find the last record so that we can create dump until that particular record. To achieve this:
MongoDB Enterprise > db.subreddits.find({}, {_id: 1}).sort({_id: -1}).skip(10965848).limit(1)
{ “_id” : ObjectId(“5c2f048eec3fae481c65e761”) }
MongoDB Enterprise >
Create a folder where mongodb will perform backup operation.
[sanjeevakumar@sanjeeva UseCase]$ mkdir subreddits-small
[sanjeevakumar@sanjeeva UseCase]$ cd subreddits-small
Moving to this folder I will use mongodump command to dump this specific collection in to local folder. The command would be: [sanjeevakumar@sanjeeva subreddits-small]$ mongodump –db subreddits –collection subreddits –query ‘{ _id: {$gte: ObjectId(“5c2f048eec3fae481c65e761”)}}’ The Output of the command on terminal should look like: 2019-01-21T13:01:00.017+0530 writing subreddits.subreddits to 2019-01-21T13:01:03.015+0530 subreddits.subreddits 109440 2019-01-21T13:01:06.023+0530 subreddits.subreddits 260079 2019-01-21T13:01:09.012+0530 subreddits.subreddits 428705 2019-01-21T13:01:12.008+0530 subreddits.subreddits 569975 2019-01-21T13:01:15.007+0530 subreddits.subreddits 714285 2019-01-21T13:01:18.005+0530 subreddits.subreddits 876222 2019-01-21T13:01:21.008+0530 subreddits.subreddits 1030353 2019-01-21T13:01:24.020+0530 subreddits.subreddits 1179691 2019-01-21T13:01:27.025+0530 subreddits.subreddits 1337802 2019-01-21T13:01:30.010+0530 subreddits.subreddits 1472892 2019-01-21T13:01:33.010+0530 subreddits.subreddits 1620462 2019-01-21T13:01:36.011+0530 subreddits.subreddits 1772154 2019-01-21T13:01:39.012+0530 subreddits.subreddits 1921318 2019-01-21T13:01:42.006+0530 subreddits.subreddits 2060214 2019-01-21T13:01:45.016+0530 subreddits.subreddits 2216724 2019-01-21T13:01:48.015+0530 subreddits.subreddits 2384443 2019-01-21T13:01:51.019+0530 subreddits.subreddits 2541989 2019-01-21T13:01:54.018+0530 subreddits.subreddits 2693717 2019-01-21T13:01:57.041+0530 subreddits.subreddits 2865361 2019-01-21T13:02:00.005+0530 subreddits.subreddits 3021080 2019-01-21T13:02:03.006+0530 subreddits.subreddits 3175131 2019-01-21T13:02:06.007+0530 subreddits.subreddits 3309922 2019-01-21T13:02:09.015+0530 subreddits.subreddits 3485494 2019-01-21T13:02:12.013+0530 subreddits.subreddits 3630795 2019-01-21T13:02:15.006+0530 subreddits.subreddits 3797709 2019-01-21T13:02:18.006+0530 subreddits.subreddits 3954066 2019-01-21T13:02:21.035+0530 subreddits.subreddits 4116816 2019-01-21T13:02:24.006+0530 subreddits.subreddits 4279750 2019-01-21T13:02:27.018+0530 subreddits.subreddits 4436782 2019-01-21T13:02:30.013+0530 subreddits.subreddits 4576079 2019-01-21T13:02:33.024+0530 subreddits.subreddits 4727234 2019-01-21T13:02:36.007+0530 subreddits.subreddits 4886049 2019-01-21T13:02:39.016+0530 subreddits.subreddits 5040348 2019-01-21T13:02:42.005+0530 subreddits.subreddits 5186742 2019-01-21T13:02:45.017+0530 subreddits.subreddits 5339403 2019-01-21T13:02:48.017+0530 subreddits.subreddits 5504799 2019-01-21T13:02:51.006+0530 subreddits.subreddits 5663785 2019-01-21T13:02:54.021+0530 subreddits.subreddits 5815450 2019-01-21T13:02:57.007+0530 subreddits.subreddits 5959356 2019-01-21T13:03:00.007+0530 subreddits.subreddits 6130835 2019-01-21T13:03:03.024+0530 subreddits.subreddits 6289854 2019-01-21T13:03:06.008+0530 subreddits.subreddits 6428449 2019-01-21T13:03:09.010+0530 subreddits.subreddits 6567173 2019-01-21T13:03:12.006+0530 subreddits.subreddits 6732271 2019-01-21T13:03:15.005+0530 subreddits.subreddits 6893844 2019-01-21T13:03:18.013+0530 subreddits.subreddits 7054853 2019-01-21T13:03:21.011+0530 subreddits.subreddits 7198442 2019-01-21T13:03:24.007+0530 subreddits.subreddits 7360734 2019-01-21T13:03:27.034+0530 subreddits.subreddits 7500227 2019-01-21T13:03:30.007+0530 subreddits.subreddits 7641580 2019-01-21T13:03:33.016+0530 subreddits.subreddits 7786686 2019-01-21T13:03:36.025+0530 subreddits.subreddits 7945521 2019-01-21T13:03:39.014+0530 subreddits.subreddits 8113746 2019-01-21T13:03:42.009+0530 subreddits.subreddits 8277532 2019-01-21T13:03:45.026+0530 subreddits.subreddits 8436326 2019-01-21T13:03:48.006+0530 subreddits.subreddits 8590044 2019-01-21T13:03:51.007+0530 subreddits.subreddits 8761710 2019-01-21T13:03:54.010+0530 subreddits.subreddits 8911091 2019-01-21T13:03:57.011+0530 subreddits.subreddits 9027151 2019-01-21T13:04:00.020+0530 subreddits.subreddits 9186679 2019-01-21T13:04:03.026+0530 subreddits.subreddits 9364898 2019-01-21T13:04:06.023+0530 subreddits.subreddits 9535396 2019-01-21T13:04:09.014+0530 subreddits.subreddits 9698002 2019-01-21T13:04:12.013+0530 subreddits.subreddits 9849075 2019-01-21T13:04:15.022+0530 subreddits.subreddits 10016940 2019-01-21T13:04:18.019+0530 subreddits.subreddits 10190022 2019-01-21T13:04:21.006+0530 subreddits.subreddits 10345383 2019-01-21T13:04:24.013+0530 subreddits.subreddits 10507659 2019-01-21T13:04:27.012+0530 subreddits.subreddits 10669464 2019-01-21T13:04:30.006+0530 subreddits.subreddits 10822468 2019-01-21T13:04:32.611+0530 subreddits.subreddits 10965849 2019-01-21T13:04:32.611+0530 done dumping subreddits.subreddits (10965849 documents)
Once dump is completed, a restore would be need to create desired collection. This new collection can be created in a new database or in the same database as per choice. The command would be:
[sanjeevakumar@sanjeeva subreddits-small]$ mongorestore -d subreddits_40 –collection subreddits_40 ./dump/subreddits/subreddits.bson
2019-01-21T13:05:53.374+0530 checking for collection data in dump/subreddits/subreddits.bson
2019-01-21T13:05:53.376+0530 reading metadata for subreddits_40.subreddits_40 from dump/subreddits/subreddits.metadata.json
2019-01-21T13:05:53.498+0530 restoring subreddits_40.subreddits_40 from dump/subreddits/subreddits.bson
2019-01-21T13:05:56.391+0530 [……………………] subreddits_40.subreddits_40 118MB/17.9GB (0.6%)
2019-01-21T13:05:59.379+0530 [……………………] subreddits_40.subreddits_40 267MB/17.9GB (1.5%)
2019-01-21T13:06:02.385+0530 [……………………] subreddits_40.subreddits_40 409MB/17.9GB (2.2%)
2019-01-21T13:06:05.366+0530 [……………………] subreddits_40.subreddits_40 500MB/17.9GB (2.7%)
2019-01-21T13:06:08.366+0530 [……………………] subreddits_40.subreddits_40 628MB/17.9GB (3.4%)
2019-01-21T13:06:11.389+0530 [#…………………..] subreddits_40.subreddits_40 767MB/17.9GB (4.2%)
2019-01-21T13:06:14.384+0530 [#…………………..] subreddits_40.subreddits_40 895MB/17.9GB (4.9%)
2019-01-21T13:06:17.377+0530 [#…………………..] subreddits_40.subreddits_40 1014MB/17.9GB (5.5%)
2019-01-21T13:06:20.379+0530 [#…………………..] subreddits_40.subreddits_40 1.12GB/17.9GB (6.3%)
2019-01-21T13:06:23.366+0530 [#…………………..] subreddits_40.subreddits_40 1.26GB/17.9GB (7.1%)
2019-01-21T13:06:26.366+0530 [#…………………..] subreddits_40.subreddits_40 1.40GB/17.9GB (7.9%)
2019-01-21T13:06:29.366+0530 [##………………….] subreddits_40.subreddits_40 1.53GB/17.9GB (8.6%)
2019-01-21T13:06:32.366+0530 [##………………….] subreddits_40.subreddits_40 1.66GB/17.9GB (9.3%)
2019-01-21T13:06:35.374+0530 [##………………….] subreddits_40.subreddits_40 1.81GB/17.9GB (10.1%)
2019-01-21T13:06:38.380+0530 [##………………….] subreddits_40.subreddits_40 1.93GB/17.9GB (10.8%)
2019-01-21T13:06:41.375+0530 [##………………….] subreddits_40.subreddits_40 2.06GB/17.9GB (11.5%)
2019-01-21T13:06:44.383+0530 [##………………….] subreddits_40.subreddits_40 2.19GB/17.9GB (12.3%)
2019-01-21T13:06:47.379+0530 [###…………………] subreddits_40.subreddits_40 2.32GB/17.9GB (13.0%)
2019-01-21T13:06:50.387+0530 [###…………………] subreddits_40.subreddits_40 2.45GB/17.9GB (13.7%)
2019-01-21T13:06:53.374+0530 [###…………………] subreddits_40.subreddits_40 2.56GB/17.9GB (14.3%)
2019-01-21T13:06:56.396+0530 [###…………………] subreddits_40.subreddits_40 2.69GB/17.9GB (15.1%)
2019-01-21T13:06:59.366+0530 [###…………………] subreddits_40.subreddits_40 2.85GB/17.9GB (15.9%)
2019-01-21T13:07:02.384+0530 [###…………………] subreddits_40.subreddits_40 2.96GB/17.9GB (16.6%)
2019-01-21T13:07:05.366+0530 [####………………..] subreddits_40.subreddits_40 3.10GB/17.9GB (17.4%)
2019-01-21T13:07:08.394+0530 [####………………..] subreddits_40.subreddits_40 3.22GB/17.9GB (18.0%)
2019-01-21T13:07:11.366+0530 [####………………..] subreddits_40.subreddits_40 3.36GB/17.9GB (18.8%)
2019-01-21T13:07:14.370+0530 [####………………..] subreddits_40.subreddits_40 3.50GB/17.9GB (19.6%)
2019-01-21T13:07:17.390+0530 [####………………..] subreddits_40.subreddits_40 3.62GB/17.9GB (20.3%)
2019-01-21T13:07:20.366+0530 [#####……………….] subreddits_40.subreddits_40 3.75GB/17.9GB (21.0%)
2019-01-21T13:07:23.375+0530 [#####……………….] subreddits_40.subreddits_40 3.89GB/17.9GB (21.8%)
2019-01-21T13:07:26.369+0530 [#####……………….] subreddits_40.subreddits_40 4.02GB/17.9GB (22.5%)
2019-01-21T13:07:29.372+0530 [#####……………….] subreddits_40.subreddits_40 4.16GB/17.9GB (23.3%)
2019-01-21T13:07:32.371+0530 [#####……………….] subreddits_40.subreddits_40 4.29GB/17.9GB (24.0%)
2019-01-21T13:07:35.381+0530 [#####……………….] subreddits_40.subreddits_40 4.40GB/17.9GB (24.6%)
2019-01-21T13:07:38.376+0530 [######………………] subreddits_40.subreddits_40 4.53GB/17.9GB (25.4%)
2019-01-21T13:07:41.397+0530 [######………………] subreddits_40.subreddits_40 4.65GB/17.9GB (26.1%)
2019-01-21T13:07:44.368+0530 [######………………] subreddits_40.subreddits_40 4.78GB/17.9GB (26.7%)
2019-01-21T13:07:47.366+0530 [######………………] subreddits_40.subreddits_40 4.90GB/17.9GB (27.4%)
2019-01-21T13:07:50.388+0530 [######………………] subreddits_40.subreddits_40 5.02GB/17.9GB (28.1%)
2019-01-21T13:07:53.376+0530 [######………………] subreddits_40.subreddits_40 5.15GB/17.9GB (28.8%)
2019-01-21T13:07:56.386+0530 [#######……………..] subreddits_40.subreddits_40 5.28GB/17.9GB (29.6%)
2019-01-21T13:07:59.367+0530 [#######……………..] subreddits_40.subreddits_40 5.44GB/17.9GB (30.5%)
2019-01-21T13:08:02.380+0530 [#######……………..] subreddits_40.subreddits_40 5.57GB/17.9GB (31.2%)
2019-01-21T13:08:05.366+0530 [#######……………..] subreddits_40.subreddits_40 5.70GB/17.9GB (31.9%)
2019-01-21T13:08:08.366+0530 [#######……………..] subreddits_40.subreddits_40 5.82GB/17.9GB (32.6%)
2019-01-21T13:08:11.366+0530 [########…………….] subreddits_40.subreddits_40 5.97GB/17.9GB (33.4%)
2019-01-21T13:08:14.376+0530 [########…………….] subreddits_40.subreddits_40 6.09GB/17.9GB (34.1%)
2019-01-21T13:08:17.370+0530 [########…………….] subreddits_40.subreddits_40 6.23GB/17.9GB (34.9%)
2019-01-21T13:08:20.366+0530 [########…………….] subreddits_40.subreddits_40 6.34GB/17.9GB (35.5%)
2019-01-21T13:08:23.367+0530 [########…………….] subreddits_40.subreddits_40 6.47GB/17.9GB (36.2%)
2019-01-21T13:08:26.385+0530 [########…………….] subreddits_40.subreddits_40 6.60GB/17.9GB (37.0%)
2019-01-21T13:08:29.372+0530 [#########……………] subreddits_40.subreddits_40 6.73GB/17.9GB (37.7%)
2019-01-21T13:08:32.368+0530 [#########……………] subreddits_40.subreddits_40 6.87GB/17.9GB (38.5%)
2019-01-21T13:08:35.390+0530 [#########……………] subreddits_40.subreddits_40 7.02GB/17.9GB (39.3%)
2019-01-21T13:08:38.380+0530 [#########……………] subreddits_40.subreddits_40 7.15GB/17.9GB (40.1%)
2019-01-21T13:08:41.371+0530 [#########……………] subreddits_40.subreddits_40 7.30GB/17.9GB (40.9%)
2019-01-21T13:08:44.416+0530 [##########…………..] subreddits_40.subreddits_40 7.44GB/17.9GB (41.7%)
2019-01-21T13:08:47.373+0530 [##########…………..] subreddits_40.subreddits_40 7.58GB/17.9GB (42.5%)
2019-01-21T13:08:50.385+0530 [##########…………..] subreddits_40.subreddits_40 7.72GB/17.9GB (43.3%)
2019-01-21T13:08:53.378+0530 [##########…………..] subreddits_40.subreddits_40 7.86GB/17.9GB (44.0%)
2019-01-21T13:08:56.366+0530 [##########…………..] subreddits_40.subreddits_40 7.98GB/17.9GB (44.7%)
2019-01-21T13:08:59.369+0530 [##########…………..] subreddits_40.subreddits_40 8.14GB/17.9GB (45.6%)
2019-01-21T13:09:02.368+0530 [###########………….] subreddits_40.subreddits_40 8.28GB/17.9GB (46.4%)
2019-01-21T13:09:05.383+0530 [###########………….] subreddits_40.subreddits_40 8.43GB/17.9GB (47.2%)
2019-01-21T13:09:08.371+0530 [###########………….] subreddits_40.subreddits_40 8.57GB/17.9GB (48.0%)
2019-01-21T13:09:11.371+0530 [###########………….] subreddits_40.subreddits_40 8.71GB/17.9GB (48.8%)
2019-01-21T13:09:14.366+0530 [###########………….] subreddits_40.subreddits_40 8.85GB/17.9GB (49.6%)
2019-01-21T13:09:17.375+0530 [############…………] subreddits_40.subreddits_40 8.99GB/17.9GB (50.4%)
2019-01-21T13:09:20.390+0530 [############…………] subreddits_40.subreddits_40 9.13GB/17.9GB (51.2%)
2019-01-21T13:09:23.380+0530 [############…………] subreddits_40.subreddits_40 9.28GB/17.9GB (52.0%)
2019-01-21T13:12:51.339+0530 [############…………] subreddits_40.subreddits_40 9.40GB/17.9GB (52.7%)
2019-01-21T13:12:54.352+0530 [############…………] subreddits_40.subreddits_40 9.55GB/17.9GB (53.5%)
2019-01-21T13:12:57.334+0530 [#############………..] subreddits_40.subreddits_40 9.70GB/17.9GB (54.3%)
2019-01-21T13:13:00.326+0530 [#############………..] subreddits_40.subreddits_40 9.84GB/17.9GB (55.1%)
2019-01-21T13:13:03.331+0530 [#############………..] subreddits_40.subreddits_40 9.97GB/17.9GB (55.8%)
2019-01-21T13:13:06.344+0530 [#############………..] subreddits_40.subreddits_40 10.1GB/17.9GB (56.6%)
2019-01-21T13:13:09.337+0530 [#############………..] subreddits_40.subreddits_40 10.2GB/17.9GB (57.4%)
2019-01-21T13:13:12.331+0530 [#############………..] subreddits_40.subreddits_40 10.4GB/17.9GB (58.2%)
2019-01-21T13:13:15.344+0530 [##############……….] subreddits_40.subreddits_40 10.5GB/17.9GB (59.0%)
2019-01-21T13:13:18.331+0530 [##############……….] subreddits_40.subreddits_40 10.7GB/17.9GB (59.7%)
2019-01-21T13:13:21.330+0530 [##############……….] subreddits_40.subreddits_40 10.8GB/17.9GB (60.6%)
2019-01-21T13:13:24.325+0530 [##############……….] subreddits_40.subreddits_40 10.9GB/17.9GB (61.3%)
2019-01-21T13:13:27.341+0530 [##############……….] subreddits_40.subreddits_40 11.1GB/17.9GB (62.0%)
2019-01-21T13:13:30.326+0530 [###############………] subreddits_40.subreddits_40 11.2GB/17.9GB (62.6%)
2019-01-21T13:13:33.364+0530 [###############………] subreddits_40.subreddits_40 11.3GB/17.9GB (63.2%)
2019-01-21T13:13:36.356+0530 [###############………] subreddits_40.subreddits_40 11.4GB/17.9GB (63.7%)
2019-01-21T13:13:39.339+0530 [###############………] subreddits_40.subreddits_40 11.5GB/17.9GB (64.3%)
2019-01-21T13:13:42.358+0530 [###############………] subreddits_40.subreddits_40 11.6GB/17.9GB (64.8%)
2019-01-21T13:13:45.328+0530 [###############………] subreddits_40.subreddits_40 11.7GB/17.9GB (65.3%)
2019-01-21T13:13:48.360+0530 [###############………] subreddits_40.subreddits_40 11.8GB/17.9GB (65.8%)
2019-01-21T13:13:51.349+0530 [###############………] subreddits_40.subreddits_40 11.9GB/17.9GB (66.4%)
2019-01-21T13:13:54.329+0530 [################……..] subreddits_40.subreddits_40 12.0GB/17.9GB (67.0%)
2019-01-21T13:13:57.325+0530 [################……..] subreddits_40.subreddits_40 12.1GB/17.9GB (67.6%)
2019-01-21T13:14:00.358+0530 [################……..] subreddits_40.subreddits_40 12.2GB/17.9GB (68.2%)
2019-01-21T13:14:03.342+0530 [################……..] subreddits_40.subreddits_40 12.3GB/17.9GB (68.8%)
2019-01-21T13:14:06.349+0530 [################……..] subreddits_40.subreddits_40 12.4GB/17.9GB (69.4%)
2019-01-21T13:14:09.333+0530 [################……..] subreddits_40.subreddits_40 12.5GB/17.9GB (69.9%)
2019-01-21T13:14:12.391+0530 [################……..] subreddits_40.subreddits_40 12.6GB/17.9GB (70.5%)
2019-01-21T13:14:15.329+0530 [#################…….] subreddits_40.subreddits_40 12.7GB/17.9GB (71.0%)
2019-01-21T13:14:18.327+0530 [#################…….] subreddits_40.subreddits_40 12.8GB/17.9GB (71.5%)
2019-01-21T13:14:21.344+0530 [#################…….] subreddits_40.subreddits_40 12.9GB/17.9GB (72.1%)
2019-01-21T13:14:24.345+0530 [#################…….] subreddits_40.subreddits_40 12.9GB/17.9GB (72.6%)
2019-01-21T13:14:27.332+0530 [#################…….] subreddits_40.subreddits_40 13.0GB/17.9GB (73.1%)
2019-01-21T13:14:30.363+0530 [#################…….] subreddits_40.subreddits_40 13.2GB/17.9GB (73.7%)
2019-01-21T13:14:33.353+0530 [#################…….] subreddits_40.subreddits_40 13.3GB/17.9GB (74.3%)
2019-01-21T13:14:36.328+0530 [#################…….] subreddits_40.subreddits_40 13.4GB/17.9GB (75.0%)
2019-01-21T13:14:39.329+0530 [##################……] subreddits_40.subreddits_40 13.5GB/17.9GB (75.7%)
2019-01-21T13:14:42.331+0530 [##################……] subreddits_40.subreddits_40 13.6GB/17.9GB (76.4%)
2019-01-21T13:14:45.329+0530 [##################……] subreddits_40.subreddits_40 13.8GB/17.9GB (77.1%)
2019-01-21T13:14:48.351+0530 [##################……] subreddits_40.subreddits_40 13.9GB/17.9GB (77.8%)
2019-01-21T13:14:51.327+0530 [##################……] subreddits_40.subreddits_40 14.0GB/17.9GB (78.5%)
2019-01-21T13:14:54.334+0530 [##################……] subreddits_40.subreddits_40 14.1GB/17.9GB (79.1%)
2019-01-21T13:14:57.346+0530 [###################…..] subreddits_40.subreddits_40 14.2GB/17.9GB (79.7%)
2019-01-21T13:15:00.345+0530 [###################…..] subreddits_40.subreddits_40 14.4GB/17.9GB (80.5%)
2019-01-21T13:15:03.358+0530 [###################…..] subreddits_40.subreddits_40 14.5GB/17.9GB (81.0%)
2019-01-21T13:15:06.378+0530 [###################…..] subreddits_40.subreddits_40 14.6GB/17.9GB (81.5%)
2019-01-21T13:15:09.337+0530 [###################…..] subreddits_40.subreddits_40 14.6GB/17.9GB (82.0%)
2019-01-21T13:15:12.368+0530 [###################…..] subreddits_40.subreddits_40 14.7GB/17.9GB (82.4%)
2019-01-21T13:15:15.334+0530 [###################…..] subreddits_40.subreddits_40 14.8GB/17.9GB (83.0%)
2019-01-21T13:15:18.346+0530 [####################….] subreddits_40.subreddits_40 14.9GB/17.9GB (83.4%)
2019-01-21T13:15:21.362+0530 [####################….] subreddits_40.subreddits_40 15.0GB/17.9GB (83.8%)
2019-01-21T13:15:24.402+0530 [####################….] subreddits_40.subreddits_40 15.1GB/17.9GB (84.3%)
2019-01-21T13:15:27.334+0530 [####################….] subreddits_40.subreddits_40 15.2GB/17.9GB (84.8%)
2019-01-21T13:15:30.374+0530 [####################….] subreddits_40.subreddits_40 15.2GB/17.9GB (85.3%)
2019-01-21T13:15:33.356+0530 [####################….] subreddits_40.subreddits_40 15.3GB/17.9GB (85.8%)
2019-01-21T13:15:36.355+0530 [####################….] subreddits_40.subreddits_40 15.4GB/17.9GB (86.3%)
2019-01-21T13:15:39.331+0530 [####################….] subreddits_40.subreddits_40 15.5GB/17.9GB (86.8%)
2019-01-21T13:15:42.358+0530 [####################….] subreddits_40.subreddits_40 15.6GB/17.9GB (87.3%)
2019-01-21T13:15:45.326+0530 [#####################…] subreddits_40.subreddits_40 15.7GB/17.9GB (87.8%)
2019-01-21T13:15:48.326+0530 [#####################…] subreddits_40.subreddits_40 15.8GB/17.9GB (88.3%)
2019-01-21T13:15:51.356+0530 [#####################…] subreddits_40.subreddits_40 15.8GB/17.9GB (88.8%)
2019-01-21T13:15:54.348+0530 [#####################…] subreddits_40.subreddits_40 15.9GB/17.9GB (89.2%)
2019-01-21T13:15:57.440+0530 [#####################…] subreddits_40.subreddits_40 16.0GB/17.9GB (89.6%)
2019-01-21T13:16:00.339+0530 [#####################…] subreddits_40.subreddits_40 16.1GB/17.9GB (90.1%)
2019-01-21T13:16:03.330+0530 [#####################…] subreddits_40.subreddits_40 16.2GB/17.9GB (90.6%)
2019-01-21T13:16:06.337+0530 [#####################…] subreddits_40.subreddits_40 16.3GB/17.9GB (91.1%)
2019-01-21T13:16:09.327+0530 [######################..] subreddits_40.subreddits_40 16.4GB/17.9GB (91.8%)
2019-01-21T13:16:12.337+0530 [######################..] subreddits_40.subreddits_40 16.5GB/17.9GB (92.2%)
2019-01-21T13:16:15.342+0530 [######################..] subreddits_40.subreddits_40 16.6GB/17.9GB (92.9%)
2019-01-21T13:16:18.344+0530 [######################..] subreddits_40.subreddits_40 16.7GB/17.9GB (93.6%)
2019-01-21T13:16:21.326+0530 [######################..] subreddits_40.subreddits_40 16.8GB/17.9GB (94.3%)
2019-01-21T13:16:24.328+0530 [######################..] subreddits_40.subreddits_40 17.0GB/17.9GB (95.0%)
2019-01-21T13:16:27.325+0530 [######################..] subreddits_40.subreddits_40 17.1GB/17.9GB (95.5%)
2019-01-21T13:16:30.329+0530 [#######################.] subreddits_40.subreddits_40 17.2GB/17.9GB (96.3%)
2019-01-21T13:16:33.370+0530 [#######################.] subreddits_40.subreddits_40 17.3GB/17.9GB (97.0%)
2019-01-21T13:16:36.367+0530 [#######################.] subreddits_40.subreddits_40 17.4GB/17.9GB (97.6%)
2019-01-21T13:16:39.326+0530 [#######################.] subreddits_40.subreddits_40 17.5GB/17.9GB (98.3%)
2019-01-21T13:16:42.328+0530 [#######################.] subreddits_40.subreddits_40 17.7GB/17.9GB (98.9%)
2019-01-21T13:16:45.325+0530 [#######################.] subreddits_40.subreddits_40 17.8GB/17.9GB (99.5%)
2019-01-21T13:16:47.965+0530 [########################] subreddits_40.subreddits_40 17.9GB/17.9GB (100.0%)
2019-01-21T13:16:47.965+0530 no indexes to restore
2019-01-21T13:16:47.965+0530 finished restoring subreddits_40.subreddits_40 (10965849 documents)
2019-01-21T13:16:47.965+0530 done
[sanjeevakumar@sanjeeva subreddits-small]
$
Logon to MongoDB and list the databases
MongoDB Enterprise > show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
m201 0.099GB
subreddits 7.834GB
subreddits_40 2.944GB
MongoDB Enterprise > use subreddits_40
switched to db subreddits_40
MongoDB Enterprise > show collections
subreddits_40
MongoDB Enterprise >