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

171
Views
How to backup a mongodb database with authorization enabled?

I am running a mongo database on Digital Ocean. I've set it up with the following tutorial: Mongodb setup and secured it with this tutorial: MongoDb security

Now I am trying to create a dump of a particular database. I am using the following command as stated in this article: Backup & Restore Mongodb:

sudo mongodump --db dbName --out /var/backups/mongobackups/date +"%m-%d-%y"``

However, I am getting the following error message:

Failed: error getting collections for database 'dbName': error running 'listCollections'. Database: 'dbName' Err: command listCollections requires authentication.

I've logged in on my server with root user. What am I missing?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As the error clearly says "command listCollections requires authentication." you should try "Dump database with username & password mongodump -u=USERNAME -p=PASSWORD --db=DB_NAME."

:)

about 4 years ago · Juan Pablo Isaza 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!