为什么克隆 RDS 集群比 snapc 更快更高效 space

Why cloning an RDS cluster is faster and more space efficient than snapc

我想创建一个 Aurora 数据库集群的副本(克隆)。

源和副本都在同一区域,并且都用于开发目的。

两者都是MySql。

我想通过不同的 url 访问每个集群。

正在阅读 Copy-on-write protocol for Aurora cloning.SQL snapshot

aws 文档指出:“与使用恢复快照等不同技术物理复制数据相比,创建克隆更快且更 space 高效。” (source)

但是,我不太明白为什么使用快照是一个较差的解决方案?

快照较慢,因为首先 snapshot 复制 整个数据库存储 :

The amount of time it takes to create a DB cluster snapshot varies with the size your databases. Since the snapshot includes the entire storage volume, the size of files, such as temporary files, also affects the amount of time it takes to create the snapshot.

因此,如果您的数据库有 100GB,那么它的第一个快照将需要复制 100GB。此操作可能需要一些时间。

相比之下,当您克隆时,一开始没有复制。原始数据库和新数据库使用相同的存储。只有当执行写操作时,它们才开始发散。