Skip to main content Skip to complementary content

Migrating MongoDB

Upgrade your MongoDB instance to a newer version and migrate data for Talend Dictionary Service, Talend Data Stewardship, and Talend Data Preparation.

Migrating MongoDB for Talend Dictionary Service

Follow this procedure to upgrade your previous MongoDB to MongoDB 7 and migrate data for Talend Dictionary Service. For more information about the compatible versions, see Compatible databases.

Before you begin

  • You downloaded MongoDB 7.

Procedure

  1. Stop the previous version of Talend Data Preparation, Talend Data Stewardship and Talend Component Server but keep MongoDB running.
  2. Open a command prompt.
  3. Back up your MongoDB Talend Dictionary Service data by running one of the following commands.

    For Linux:

    <mongo_path>/bin ./mongodump -h <source_mongodb_host>:<source_mongo_port> -u <mongo_dqDict_username> -p <mongo_dqDict_password> -d <mongo_dqDict_database> -o <dqDict_backup_location>

    For Windows:

    <mongo_path>/bin>mongodump -h <source_mongodb_host>:<source_mongo_port> -u <mongo_dqDict_username> -p <mongo_dqDict_password> -d <mongo_dqDict_database> -o <dqDict_backup_location>

    For example: mongodump -h localhost:27017 -d dqdict -u dqdict-user -p duser -o dump\

  4. Stop the MongoDB instance.
  5. Uninstall your previous MongoDB.
  6. Install the new MongoDB version. For more information about the MongoDB installation, see the MongoDB documentation.
  7. Start the new MongoDB version.
  8. Restore the MongoDB backup by running one of the following commands.

    For Linux:

    <mongo_path>/bin ./mongorestore -h <mongo_host>:<mongo_port> -u <mongo_dqDict_username> -p <mongo_dqDict_password> -d <mongo_dqDict_database> <dqDict_backup_location>

    For Windows:

    <mongo_path>/bin>mongorestore -h <mongo_host>:<mongo_port> -u <mongo_dqDict_username> -p <mongo_dqDict_password> -d <mongo_dqDict_database> <dqDict_backup_location>

    For example: mongorestore -h localhost:27017 -u dqdict-user -p duser -d dqdict dump\

What to do next

Migrate your data for Talend Data Stewardship and Talend Data Preparation.

Migrating MongoDB for Talend Data Stewardship

Follow this procedure to upgrade your previous MongoDB to MongoDB 7 and migrate data for Talend Data Stewardship. 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 Stewardship MongoDB. For more information, see Migrating MongoDB for Talend Dictionary Service.

Procedure

  1. Stop the previous version of Talend Data Stewardship but keep MongoDB running.
  2. Back up your MongoDB by running one of the following commands.

    For Linux:

    <mongo_path>/bin ./mongodump -h <source_mongodb_host>:<source_mongo_port> -u <mongo_tds_username> -p <mongo_tds_password> -d <mongo_tds_database> -o <backup_location>

    For Windows:

    <mongo_path>/bin>mongodump -h <source_mongodb_host>:<source_mongo_port> -u <mongo_tds_username> -p <mongo_tds_password> -d <mongo_tds_database> -o <backup_location>

    For example: mongodump -h localhost:27017 -u tdsuser -p tds -d tds -o dump\

  3. Stop the MongoDB instance.
  4. Uninstall your previous MongoDB.
  5. Install MongoDB 7. For more information about the MongoDB installation, see the MongoDB documentation.
  6. Start the new MongoDB version.
  7. Restore the MongoDB backup by running one of the following commands.

    For Linux:

    <mongo_path>/bin ./mongorestore -h <mongo_host>:<mongo_port> -u <mongo_tds_username> -p <mongo_tds_password> -d <mongo_tds_database> <backup_location>

    For Windows:

    <mongo_path>/bin>mongorestore -h <mongo_host>:<mongo_port> -u <mongo_tds_username> -p <mongo_tds_password> -d <mongo_tds_database> <backup_location>

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

  8. Start Talend Data Stewardship.

Migrating MongoDB for Talend Data Preparation

Follow this procedure to upgrade your previous MongoDB to MongoDB 8 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 the previous version of Talend Data Preparation and Talend Component Server but keep MongoDB running.
  2. Open a command prompt.
  3. Back up your MongoDB Talend Data Preparation data by running one of the following commands.
    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 your previous MongoDB.
  7. Install MongoDB 8. For more information about the MongoDB installation, see the MongoDB documentation.
  8. Start the new MongoDB version.
  9. Restore the MongoDB backup by running one of 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!