I'm trying to migrate my db over to a new machine. When I use mongodump
in cmd it gives the error:
Failed: error dumping metadata: error creating directory for metadata file dump\margin_calls: mkdir dump: Access is denied.
I know I need to grant the 'backup' permission to allow this but I can't figure out how to do this.
EDIT: I thought this was quite an easy problem for someone familiar with the mongodb environment ?
I ran into the same issue. It's because you do not have write permissions in the directory. You can change your command to:
mongodump --out C:\Users\{YourUser}\Desktop
for example. So the backup dump is stored in a new folder in your desktop (change the path to store it in a different location).
Thanks to: https://stackoverflow.com/a/37510708/13811514 for the original post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With