【发布时间】:2021-12-14 02:19:24
【问题描述】:
尝试编写脚本以使用云命令批量创建迁移作业。我已成功创建源和目标连接配置文件,但在创建作业时出现以下错误:
ERROR: (gcloud.database-migration.migration-jobs.create) FAILED_PRECONDITION: The specified connection profile 'projects/<project_name>/locations/us-central1/connectionProfiles/cp2' does not exist, please create it first, and then try again
这是我正在运行的命令
gcloud database-migration connection-profiles create postgresql cp1 --region=us-central1 --password=test! --username=postgres --display-name=migration-test --host=10.119.0.206 --port=5432 --cloudsql-instance=migration-test
gcloud database-migration connection-profiles create postgresql cp2 --region=us-central1 --password=test! --username=postgres --display-name=migration-test-new --host=10.119.0.253 --port=5432 --cloudsql-instance=migration-test-new
gcloud database-migration migration-jobs create migration-test --region=us-central1 --display-name=hello --source=cp1 --destination=cp2 --type=CONTINUOUS
【问题讨论】:
标签: database postgresql google-cloud-platform database-migration gcloud