Skip to main content Skip to complementary content

Migrating MongoDB for Talend Data Preparation

Follow this procedure to upgrade MongoDB 4.4 to MongoDB 5 or 7 and migrate data for Talend Data Preparation. For more information about the compatible versions, see Compatible databases.

Before you begin

  • If you have installed and used Talend Dictionary Service to create custom semantic types or update the predefined ones, you must migrate Talend Dictionary Service MongoDB before migrating Talend Data Preparation MongoDB. For more information, see Migrating MongoDB for Talend Dictionary Service.

Procedure

  1. Stop your instance of the previous version of Talend Data Preparation and Talend Component Server but keep MongoDB running.
  2. Open the command prompt.
  3. Back up your MongoDB Talend Data Preparation data by running the following command.
    For Linux:
    <mongo_path>/bin ./mongodump -h <source_mongodb_host>:<source_mongo_port> -u <mongo_tdp_username> -p <mongo_tdp_password> -d <mongo_tdp_database> -o <tdp_backup_location>
    For Windows:
    <mongo_path>/bin>mongodump -h <source_mongodb_host>:<source_mongo_port> -u <mongo_tdp_username> -p <mongo_tdp_password> -d <mongo_tdp_database> -o <tdp_backup_location>

    For example: mongodump -h localhost:27017 -u tdpuser -p tdp -d tdp -o dump\

  4. Copy the /data folder and paste it in another repository as a back up. You should not modify this folder.
  5. Stop the MongoDB instance.
  6. Uninstall MongoDB 4.4.
  7. Install MongoDB 5 or 7. For more information about the MongoDB installation, see the MongoDB documentation.
  8. Start the new MongoDB version.
  9. Restore the MongoDB backup by running the following commands.

    For Linux:

    <mongo_path>/bin ./mongorestore -h <mongo_host>:<mongo_port> -u <mongo_tdp_username> -p <mongo_tdp_password> -d <mongo_tdp_database> <tdp_backup_location>

    For Windows:

    <mongo_path>/bin>mongorestore -h <mongo_host>:<mongo_port> -u <mongo_tdp_username> -p <mongo_tdp_password> -d <mongo_tdp_database> <tdp_backup_location>

    For example: ./mongorestore -h localhost:27017 -u tdpuser -p tdp -d tdp -o dump\

  10. Verify the /data folder. If you moved it, you need to restore it.
  11. Start Talend Data Preparation and Talend Component Server.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!