How to backup the "Aggregations" database and use on local machine

I’d like to backup the “Aggregations” database on Atlas and use it to practice on my local machine. This way, I wouldn’t have to log into Atlas server everytime and get disconnected after a period of inactivity.

It has something to do with mongodump and mongorestore. I’ve tried using mongodump but haven’t had any success. This is what I’ve tried:

vagrant@m103:~$ sudo mongodump --host "mongodb://cluster0-shard-00-00-,," --authenticationDatabase admin --ssl -u m121 -p aggregations

    2019-02-02T20:36:15.807+0000 Failed: error connecting to db server: no reachable servers

Any help would be appreciated. Thanks.

@trungEdm I think you may need to use a different CLI option if you’re using the URI connection string format. That said backing up that database might be problematic depending on the size. You might want to just target specific collections.


1 Like