CertSafari
    Snowflake SnowPro Core Certification (COF-C03)· Lessons

    Domain 5 · Lesson 17/19

    Time Travel, Fail-safe and zero-copy cloning

    Explain data collaboration and protection

    16 min read
    3.33% of exam
    6 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Recover changed or dropped data with AT | BEFORE queries and UNDROP while the retention period lasts
    • Set DATA_RETENTION_TIME_IN_DAYS and predict the effective retention an object inherits
    • Explain what Fail-safe protects, who can use it and what it costs
    • Predict what a zero-copy clone shares with its source and what it does not inherit

    Key concept

    Data retention period — The number of days Snowflake keeps the previous state of changed or dropped data so that you can query it, clone it or restore it yourself. When the period ends, that history moves into Fail-safe and only Snowflake can reach it.

    1.Recovering past data with Time Travel

    Time Travel lets you work with data as it was before someone changed it. When a row is updated or deleted, or a table is dropped, Snowflake keeps the earlier state for the length of the object's data retention period. During that window you can do three things with the history: query it, clone it, or restore a dropped object. Time Travel is on by default, so none of this needs setting up in advance.

    To query the past, use the AT | BEFORE clause. It goes immediately after the object name in a SELECT or a CREATE … CLONE statement, and it picks the moment with one of three parameters:

    • TIMESTAMP: a point in time
    • OFFSET: a time difference in seconds from the present
    • STATEMENT: the query ID of a statement

    Here is a typical case. An analyst runs an UPDATE that writes wrong values over several thousand rows, and notices ten minutes later. They query the table with AT and an OFFSET set to a point before the update, then use that result set to correct the damaged rows. This needs no backup and no support case. It is also not something a warehouse administrator can undo. A virtual warehouse only supplies compute for queries; it holds no data state that could be rolled back.

    UNDROP restores dropped tables, schemas, databases, accounts, external volumes and tags. If a developer dropped a production table two minutes ago and its retention period has not run out, UNDROP TABLE with the table's name brings it back as it was just before the drop. Undropping a schema or a database restores every object inside it. While Time Travel still covers the object, Fail-safe and Snowflake Support play no part in the recovery.

    Checkpoint 1 of 9· Check yourself

    An analyst ran an UPDATE that wrote wrong values over several thousand rows of a permanent table and noticed 10 minutes later. The table's retention period is 1 day. What is the best way to get the correct values back?

    Checkpoint 2 of 9· Exam question

    An analyst on Enterprise Edition ran an UPDATE statement ten minutes ago that overwrote several thousand rows in a permanent table with incorrect values, and the table's Time Travel retention is still set to the default. Which approach lets the analyst recover the pre-update row values without restoring a backup or contacting Snowflake Support?

    Checkpoint 3 of 9· Exam question

    A developer accidentally executed DROP TABLE on a production table two minutes ago, and the table's data retention period has not expired. What is the fastest supported way to restore the table exactly as it existed immediately before the drop?

    Sources12

    2.Setting and inheriting the retention period

    Every Snowflake account gets a standard retention period of 1 day (24 hours), switched on automatically. How far you can raise it depends on the edition (Snowflake editions (Standard, Enterprise, Business Critical, VPS)). Standard Edition allows only 0 or the 1-day default. On Enterprise Edition and higher, permanent databases, schemas and tables can be set to any value from 0 to 90 days. Transient and temporary objects stay at 0 or 1 day on every edition. Longer retention is not free: the extra history is stored and shows up in your monthly storage charges.

    Retention is set with the DATA_RETENTION_TIME_IN_DAYS parameter, and lower levels inherit from higher ones. A user with the ACCOUNTADMIN role sets the account default. You can override that default when you create a database, schema or table. A period set on a database or schema is inherited by default by every object created inside it, and you can change any object's period at any time. To see what an object actually has, look at the retention_time column of SHOW TABLES, SHOW SCHEMAS or SHOW DATABASES. Add HISTORY to the SHOW command to include objects that have already been dropped.

    Checking the retention period of specific tables by filtering SHOW TABLES outputsql
    SHOW TABLES
      ->> SELECT "name", "retention_time"
            FROM $1
            WHERE "name" IN ('MY_TABLE1', 'MY_TABLE2');

    Setting a retention period of 0 turns off Time Travel for that object, and the cost is real: if an object with no retention period is dropped, it cannot be restored. Snowflake recommends keeping at least 1 day on every object. At the account level, 0 does not turn Time Travel off. It only makes 0 the default for new databases, and any database, schema or table can still override it. An ACCOUNTADMIN can also set MIN_DATA_RETENTION_TIME_IN_DAYS on the account to enforce a minimum. The parameter does not replace an object's own setting. Instead, the effective period becomes MAX(DATA_RETENTION_TIME_IN_DAYS, MIN_DATA_RETENTION_TIME_IN_DAYS), so a table set to 0 in an account with a minimum of 7 actually keeps 7 days.

    Each change gets its own clock: the end of Time Travel for a version is the time of the change plus the retention period. So an old table does not lose its history all at once. A row updated this morning stays reachable for a full period from this morning, whatever the table's creation date. When a version's clock runs out, you can no longer query it, clone it at that point, or restore it if it was dropped.

    Checkpoint 4 of 9· Check yourself

    In an Enterprise Edition account, the ACCOUNTADMIN has set MIN_DATA_RETENTION_TIME_IN_DAYS = 7. A developer creates a permanent table with DATA_RETENTION_TIME_IN_DAYS = 0 and drops it by mistake the next day. What happens when they run UNDROP TABLE?

    Checkpoint 5 of 9· Fill the gap

    You want to see how many days of Time Travel two tables actually have. Which column completes this query?

    SHOW TABLES
      ->> SELECT "name", " ? "
            FROM $1
            WHERE "name" IN ('MY_TABLE1', 'MY_TABLE2');

    Checkpoint 6 of 9· Exam question

    What is the maximum Time Travel retention period that can be configured for a permanent table on Snowflake Enterprise Edition or higher?

    Sources1

    3.Fail-safe: the 7 days only Snowflake can use

    Fail-safe is a separate 7-day period that starts as soon as Time Travel ends. It protects historical data against system failures and events such as a security breach. You cannot change its length, and you cannot use it yourself. It does not let you query or undrop data after Time Travel. Snowflake uses it to recover data lost or damaged in extreme operational failures, on a best-effort basis, and only after every other recovery option has been tried. To start a recovery, you open a case with Snowflake Support. The recovery can take from several hours to several days.

    Fail-safe costs money in two ways. The data held in Fail-safe counts toward storage, and an ACCOUNTADMIN can see it in Snowsight under Admin » Cost management » Consumption, filtered to Storage. An actual recovery runs on Snowflake-managed serverless compute and is billed at the standard serverless rate. Those credits appear in the metering history views under the FAILSAFE_RECOVERY service type.

    Whether a table has Fail-safe at all depends on its type (Table types: permanent, temporary, transient, Iceberg, external). Transient and temporary tables have no Fail-safe period, which is the point of using them for data you could reload anyway. If you set a transient table's retention to 0, its changed data is simply deleted. On a permanent table, the same change sends the data to Fail-safe instead.

    Historical data protection by table type
    Table typeTime Travel retention (days)Fail-safe (days)
    Permanent, Standard Edition0 or 17
    Permanent, Enterprise Edition and higher0 to 907
    Transient0 or 10
    Temporary0 or 10

    Snowpipe Streaming is a way of ingesting data into tables, and it comes in two architectures. The classic architecture is the original implementation and is planned for future deprecation. The high-performance architecture is the one Snowflake recommends for new implementations. Only the classic one affects Fail-safe: a table that contains data ingested through it cannot use Fail-safe for recovery, so such a table has no protection beyond Time Travel.

    Checkpoint 7 of 9· Check yourself

    Four days ago, a developer dropped a permanent production table whose retention period is 1 day. Nobody noticed until today. What can the team do to get the table back?

    Sources34

    4.Zero-copy cloning: what a clone shares and what it leaves behind

    A clone is a new table, schema or database that starts out sharing its source's storage instead of copying it. At creation, the source and the clone point to the same existing micro-partitions. Their storage only diverges as one side or the other is modified, and from then on each pays for its own changed data. This makes a clone of a large production database fast to create and cheap to keep while it stays unchanged. Combined with Time Travel, CREATE … CLONE … AT(...) copies an object as it was at a past point.

    Privileges are where clones most often surprise people. When you clone a database or schema, the child objects inside the clone keep the privileges granted on their source objects. The cloned database or schema itself does not inherit the grants on the source container. When you clone a single object, most CREATE … CLONE statements copy no grants at all. Commands that support COPY GRANTS, such as CREATE TABLE … CLONE, can copy every privilege except OWNERSHIP. In every other case you grant access to the clone yourself.

    A clone keeps the object parameters that were set on its source. Its history, however, starts fresh: Time Travel on a cloned table begins at the moment the clone was created, and unconsumed records in cloned streams cannot be accessed. Several objects come over only partly, or in a stopped state:

    • Table stages are cloned empty, because files sitting in a source table stage are not copied.
    • Internal named stages are cloned only when you add INCLUDE INTERNAL STAGES. External named stages are cloned, and the cloud storage they reference is left untouched.
    • Tasks and alerts in a cloned database or schema start suspended, and Automatic Clustering is suspended on a cloned clustered table.
    • Cloned pipes start paused, or in the STOPPED_CLONED state when AUTO_INGEST = TRUE.
    • A cloned table references the cloned sequence only if the sequence's schema or database was cloned along with it. Otherwise it keeps referencing the source sequence.

    Cloning at a past point adds more exclusions. External tables and internal stages are not cloned when you use Time Travel. User tasks are left out when a schema is cloned with a timestamp, even though a plain clone of the same schema includes them.

    Checkpoint 8 of 9· Check yourself

    A QA role has USAGE on PROD_DB and SELECT on the tables inside it. You run CREATE DATABASE TEST_DB CLONE PROD_DB. The QA role still can't use TEST_DB. What is the cause, and what is the fix?

    Checkpoint 9 of 9· Match them up

    You clone a production schema without using Time Travel. Match each item from the source to its state in the clone.

    Tap a term, then the definition that fits it.

    Sources561

    Sources

    (6)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “OFFSET (time difference in seconds from the present time)”
      ↩︎ Recovering past data with Time Travel
      “UNDROP <object> command for tables, schemas, databases, accounts, external volumes, and tags.”
      ↩︎ Recovering past data with Time Travel
      “Query data in the past that has since been updated or deleted.”
      ↩︎ Recovering past data with Time Travel
      “For permanent databases, schemas, and tables, the retention period can be set to any value from 0 up to 90 days.”
      ↩︎ Setting and inheriting the retention period
      “The standard retention period is 1 day (24 hours) and is automatically enabled for all Snowflake accounts”
      ↩︎ Setting and inheriting the retention period
      “the period is inherited by default for all objects created in the database/schema.”
      ↩︎ Setting and inheriting the retention period
      “When an object with no retention period is dropped, you will not be able to restore the object.”
      ↩︎ Setting and inheriting the retention period
      “End of Time Travel = time of the change + data retention period”
      ↩︎ Setting and inheriting the retention period
      “Note that extended data retention requires additional storage which will be reflected in your monthly storage charges.”
      ↩︎ Setting and inheriting the retention period
      “When using Time Travel, the following object types are not cloned:”
      ↩︎ Zero-copy cloning: what a clone shares and what it leaves behind
      “The data retention period specifies the number of days for which this historical data is preserved”
      ↩︎ Key concept
      “the higher value setting takes precedence”
      ↩︎ Exam trap 2
      “The retention period for a piece of historical data starts when that data is changed or dropped, not when the object was created.”
      ↩︎ Prediction
      “When this parameter is set at the account level, the effective minimum data retention period for an object is determined by MAX(DATA_RETENTION_TIME_IN_DAYS, MIN_DATA_RETENTION_TIME_IN_DAYS).”
      ↩︎ Checkpoint
    2. 2.
      “The only charges to consumers are for the compute resources (i.e. virtual warehouses) used to query the imported data.”
      ↩︎ Recovering past data with Time Travel
    3. 3.
      “Fail-safe provides a (non-configurable) 7-day period during which historical data may be recoverable by Snowflake.”
      ↩︎ Fail-safe: the 7 days only Snowflake can use
      “To recover data from Fail-safe, open a case with Snowflake Support.”
      ↩︎ Fail-safe: the 7 days only Snowflake can use
      “Data recovery through Fail-safe uses Snowflake-managed serverless compute. Standard serverless compute billing applies.”
      ↩︎ Fail-safe: the 7 days only Snowflake can use
      “the classic architecture, which is the original implementation and is planned for future deprecation”
      ↩︎ Fail-safe: the 7 days only Snowflake can use
      “Fail-safe doesn’t support tables that contain data ingested by the Snowpipe Streaming classic architecture.”
      ↩︎ Fail-safe: the 7 days only Snowflake can use
      “Fail-safe is not provided as a means for accessing historical data after the Time Travel retention period has ended.”
      ↩︎ Exam trap 1
    4. 5.
      “clones share the same underlying storage as the source table.”
      ↩︎ Zero-copy cloning: what a clone shares and what it leaves behind
      “CREATE <object> … CLONE statements for most objects do not copy grants on the source object to the object clone.”
      ↩︎ Zero-copy cloning: what a clone shares and what it leaves behind
      “Internal named stages are cloned if you use the INCLUDE INTERNAL STAGES clause.”
      ↩︎ Zero-copy cloning: what a clone shares and what it leaves behind
      “If a table is cloned, historical data for the table clone begins at the time/point when the clone was created.”
      ↩︎ Zero-copy cloning: what a clone shares and what it leaves behind
      “The clone of the container itself (database or schema) doesn’t inherit the privileges granted on the source container.”
      ↩︎ Exam trap 3
      “The clone of the container itself (database or schema) doesn’t inherit the privileges granted on the source container.”
      ↩︎ Checkpoint
      “When a database or schema that contains tasks is cloned, the tasks in the clone are suspended by default.”
      ↩︎ Checkpoint
    5. 6.
      “At clone time, the source and clone share existing micro-partitions through zero-copy cloning.”
      ↩︎ Zero-copy cloning: what a clone shares and what it leaves behind

    Continue to part 2 of 2

    Replication and failover groups across regions

    Spotted a mistake, or was something unclear? Tell us.