§2024-11-03

¶ Transfer data to other system

  1. mongoexport
  1. mongoimport
    • Purpose: Used to import data from a JSON or CSV file into a MongoDB database.
    • Usage: Often used for populating a database with initial data or updating existing collections.
    • Example Command:
      • mongoimport --db myDatabase --collection myCollection --file myCollection.json
      • Options: You can specify file format, unique key handling, and other parameters.

¶ Transfer data to the same mongoDB system

  1. mongodump
  1. mongorestore

¶Incremental Backups: ???

If you need to back up only changes made since the last backup, you may consider using oplog (if using replication) or perform periodic dumps rather than full dumps every time.

¶ mongosh