2

[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?
henry vans
  • 21
  • 1
  • 3

1 Answers1

1

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.

Gerard H. Pille
  • 3,285
  • 1
  • 10
  • 13