跳到主要内容 跳到补充内容

迁移 Talend Data Stewardship 的 MongoDB

按照以下步骤将 MongoDB 4.4 升级到 MongoDB 5 或 7,并为 Talend Data Stewardship 迁移数据。有关兼容版本的更多信息,请参阅兼容数据库

开始之前

  • 如果您已安装和使用 Talend Dictionary Service 来创建自定义语义类型或更新预定义语义类型,您必须在迁移 Talend Data Stewardship MongoD 之前迁移 Talend Dictionary Service MongoD。有关更多信息,请参阅迁移 MongoDB for Talend Dictionary 服务。

步骤

  1. 停止以前版本的 Talend Data Stewardship 实例,但让 MongoDB 保持运行。
  2. 通过运行以下命令对 MongoDB 执行备份。

    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>

    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>

    例如:mongodump -h localhost:27017 -u tdsuser -p tds -d tds -o dump\

  3. 停止 MongoDB 实例。
  4. 卸载 MongoDB 4.4。
  5. 安装 MongoDB 5 或 7。有关 MongoDB 安装的更多信息,请参阅 MongoDB 文档
  6. 启动新的 MongoDB 版本。
  7. 通过运行以下命令恢复 MongoDB 备份。

    Linux 系统:

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

    Windows 系统:

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

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

  8. 开始 Talend Data Stewardship.

本页面有帮助吗?

如果您发现此页面或其内容有任何问题 – 打字错误、遗漏步骤或技术错误 – 请告诉我们如何改进!