Snowflake Postgres 时间点恢复

概述

Snowflake Postgres supports creating forks of an instance using point-in-time recovery (PITR). A fork is a new instance that reflects the state of an existing instance at a specific time. A fork is similar to a CLONE operation in Snowflake. However, unlike the CLONE operation, a fork performs a full copy of all of the origin data.

由于分支与源实例隔离,对分支进行的任何更改(包括架构或数据)都不会影响源实例。

在以下情况下,时间点恢复非常有用:

  • Recover from accidental changes, such as dropped tables or incorrect data updates.
  • 检查数据的历史状态,以进行调试或审计。
  • Test application changes against a realistic copy of production data without impacting the origin instance.

分支是基于指定时间之前源实例的最新基础备份创建的。源实例的预写日志 (WAL) 记录会被回放到所选时间点,从而确保分支实例在该时刻与源实例在事务上保持一致。

分支中复制的内容

创建分支时,将从源实例复制以下内容:

  • Postgres 版本。复制版本以保证二进制兼容性。
  • The high availability setting (enabled or disabled).
  • 用于访问实例的凭据。

在创建新实例时,您可以自定义一些属性,例如 存储实例大小(计划)。分支实例的定价与其他实例一样,取决于分支的配置(计划、存储和高可用性)。

创建分支

  1. In the navigation menu, select Postgres.

  2. 选择要创建分支的实例。

  3. Under Manage on the Postgres Instance page, select the Fork item and enter the configuration options.

    Create a Snowflake Postgres instance
  4. Select Fork to create the fork.

When you create a fork, no credentials will be displayed. Credentials for the fork are the same as the origin instance. You can regenerate credentials later if needed.

创建分支所需时间取决于源实例的大小。