4

I am considering using mongodump for daily backups.

If I always perform the dump on the same directory: do I have to make sure to clear the contents from the previous day, before running mongodump? I could not find anything about this in the documentation.

Eduardo
  • 8,362
  • 6
  • 38
  • 72
  • 1
    With everything already set up: Why didn't you try it out? – ppeterka Mar 04 '13 at 14:48
  • 1
    @ppeterka: because I would not trust the success of the backup method on a simple test; I would rather also have confirmation by people with experience. – Eduardo Mar 04 '13 at 15:09

1 Answers1

6

No, mongodump will overwrite any contents in the directory, so you're safe to use the same one.

Hans N. Hjort
  • 851
  • 7
  • 19
  • Confirmed: "[mongodump overwrites output files if they exist in the backup data folder](http://docs.mongodb.org/manual/reference/program/mongodump/#behavior)" – Harry Pehkonen Jan 15 '15 at 23:51