从 table 备份 Amazon DynamoDB 并恢复到新的 table
Amazon DynamoDB backup from a table and restore to a new table
我正在寻找一种在 Amazon DynamoDB 中执行以下步骤的方法:
- backup the
table_A
- delete the
table_A
- create a new table with the same name
table_A
- fill the new table with the backup from step. 1
这个任务的目的是我需要更改 table_A
的 LSI
(本地二级索引),更改它的唯一方法是创建一个新的 table。正确的?我还需要保留数据(不超过几MB)
#3 和#4 可以吗?还是有更好的方法来解决这整件事?如果这个 table 在生产中,什么是合理的方法?
提前致谢,
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/backuprestore_HowItWorks.html
Along with data, the following are also included (and can't be
excluded) on the backups:
- Global secondary indexes (GSIs)
- Local secondary indexes (LSIs)
- Streams
- Provisioned read and write capacity
这是我以前用过的一种方法:
- 备份
table_A
(以防出现问题)
- 使用Data Pipeline提取DynamoDB中的数据table并放入S3
- 用你的 LSI 创建一个新的 table,
table_B
- 使用数据管道
将数据从 S3 加载到 table_B
- 检查一切正常。备份
table_B
- 删除
table_A
。重新创建它。使用数据管道加载数据
https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-importexport-ddb.html
Data Pipeline 在可用性和日志记录方面相当垃圾,但它工作得很好。
我正在寻找一种在 Amazon DynamoDB 中执行以下步骤的方法:
- backup the
table_A
- delete the
table_A
- create a new table with the same name
table_A
- fill the new table with the backup from step. 1
这个任务的目的是我需要更改 table_A
的 LSI
(本地二级索引),更改它的唯一方法是创建一个新的 table。正确的?我还需要保留数据(不超过几MB)
#3 和#4 可以吗?还是有更好的方法来解决这整件事?如果这个 table 在生产中,什么是合理的方法?
提前致谢,
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/backuprestore_HowItWorks.html
Along with data, the following are also included (and can't be excluded) on the backups:
- Global secondary indexes (GSIs)
- Local secondary indexes (LSIs)
- Streams
- Provisioned read and write capacity
这是我以前用过的一种方法:
- 备份
table_A
(以防出现问题) - 使用Data Pipeline提取DynamoDB中的数据table并放入S3
- 用你的 LSI 创建一个新的 table,
table_B
- 使用数据管道 将数据从 S3 加载到
- 检查一切正常。备份
table_B
- 删除
table_A
。重新创建它。使用数据管道加载数据
table_B
https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-importexport-ddb.html
Data Pipeline 在可用性和日志记录方面相当垃圾,但它工作得很好。