Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

443
Views
How to grant permission for mongodb's mongodump

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 ?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report

0

According to the documentation, there's a built-in backup role which is designed for this sort of thing:

> use admin
> db.createUser({
    user: "backupuser",
    pwd: "12345",
    roles: ["backup"]
}) 
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!