【问题标题】:Migrate tables from Postgres RDS to another RDS将表从 Postgres RDS 迁移到另一个 RDS
【发布时间】:2020-05-19 01:18:18
【问题描述】:

我有 2 个 Postgres RDS 实例:

  • Postgres RDS 1
  • Postgres RDS 2

我在 Postgres RDS 1 中有 10 个表可用,我需要迁移到 Postgres RDS 2。

我可以使用pg_dump直接转表吗?

pg_dump -t test_migration -h postgresrds2.cr8o9qw9mt1v.us-east-1.rds.amazonaws.com -U postgres -d postgres | psql -d myschema -h postgresrds1.cr8o9qw9mt1v.us-east-1.rds.amazonaws.com -U myadminuser

我也知道将表迁移到 S3,但我不想这样做,因为它会消耗大量时间。

【问题讨论】:

标签: postgresql amazon-web-services amazon-rds


【解决方案1】:

根据您可能希望查看数据库迁移服务的复杂性。如果您执行的迁移不是很困难,那么使用 pgdump | psql 可能更容易,但如果您使用 DMS 迁移更大的表(超过 1 万行)可能会更容易。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-18
    • 1970-01-01
    • 2020-01-30
    • 2021-10-19
    • 2021-10-11
    • 2013-07-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多