[BACKUP COMMAND]: mongodump -u username -p password -d database --port port -o output path.

[ISSUE]: error writing data for collection to disk: error reading collection: Closed explicitly.

The storage requirements of my MongoDB database are constantly increasing. So far the database is using 20 GB of disk space and I am encountering errors when I want to dump the database. It always fails and the above issue is displayed in the terminal shell when I use the above mongodump command. I have to reissue the mongodump command again and again until the backup of the database finishes.

So my questions are:

  • Is there a good alternative database backup tool/command for MongoDB?
  • Is there a stable and fast backup command for large-scale MongoDB databases?
  • Am I using the correct procedure?
  • 1
    I feel your pain. Do you have a question? May 17 '18 at 6:33
  • 1
    Could you add a question and possibly reword your question? It is hard to understand what your problem is and what issue you are trying to resolve.
    – John K. N.
    May 17 '18 at 7:14
  • yeah, I have reworded my question. and now I' m not sure it is easy-understand for you?
    – henry vans
    May 18 '18 at 3:03
  • Based on your recent edit, I have tried to reword your question to increase readability. I hope you agree. If you have any objections, please visit the question's revisions and rollback to your version.
    – John K. N.
    May 18 '18 at 6:03
  • ok, thank you very much. by the way, are you an administrator of this website?
    – henry vans
    May 18 '18 at 7:43

A quote from the horse's mouth (ie. https://docs.mongodb.com/manual/core/backups/#back-up-with-mongodump):

mongodump and mongorestore are simple and efficient tools for backing up and restoring small MongoDB deployments, but are not ideal for capturing backups of larger systems.

  • thank you, do you have an ideal backup command for larger systems in mongo
    – henry vans
    May 18 '18 at 3:07
  • I don't, but see Markus's answer here: dba.stackexchange.com/questions/76130/…. Are you currently running without backup??? Better hurry to put that right and do not forget to test your recovery scenario. May 18 '18 at 6:57
  • so far I use 'mongodump' command to back up database, but I haven't tested the recovery scenario.
    – henry vans
    May 19 '18 at 4:49
  • So, the mongodump succeeds after a number of tries? Please add the exact syntax of your command to your question. May 19 '18 at 7:25
  • Exactly. Yes, the mongodump would be successful after a number of tries. Sorry I don't understand what you say "Please add the exact syntax of your command to your question", do you mean what I describe is not specific or you want to know the specific backup command what I use
    – henry vans
    May 21 '18 at 1:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.