How to Clone/Copy a mongodb database using mongodump on an AWS ECS server

Hello I have this problem regarding using mongodb dump. Kindly check out the full question on StackOverflow using this link. I will appreciate any help

https://stackoverflow.com/q/72136731/11080717

Hi @Felix_Omuok and welcome to the community!!

Based on the information shared over the stackoverflow channel, I tried to reproduce the issue in my local environment with a MongoDB version 5.0.7 and it works for me.

Please note: following privileges have been granted on the admin database for my tests.

db.createUser({ user: “admin”, pwd: “admin”, roles: [ { role: “userAdminAnyDatabase”, db: “admin” }]})

However if you could upgrade to a later version and try the same, if the issue still persists.

Also, could you provide a few more details for the topic:

  1. MongoDB and the Mongo tool version you are using.
  2. What privileges were granted to the admin database when user was created as the error reported could to be a privilege issue.
  3. From the error message posted on stack-overflow: error counting admin.system.views , could you please confirm if any data is created under admin database as it is strongly not recommended to store application data in admin db since it’s primarily for internal MongoDB operational uses. Build-in Roles

P.S. : Please note that it’s better to ask the question in complete entirety for timely response.

Thanks
Aasawari

1 Like