Snowflake

What Is Fail-safe? Snowflake Continuous Data Protection Complete Guide

2026-03-21
Updated: 2026-03-27
NicheeLab Editorial Team

Snowflake provides a comprehensive data protection framework called Continuous Data Protection (CDP), which defends your data with a layered model of Time Travel → Fail-safe → encryption. This article walks through the full CDP picture, how Fail-safe works, the clear distinctions between Time Travel and Fail-safe, and how protection periods differ by table type — all with comparison tables.

The Big Picture of Continuous Data Protection (CDP)

CDP is Snowflake's data protection framework, made up of the following three layers.

CDP timeline:

 <- point of change ───────────────────────────────→ time

 [immediate]     [Time Travel window]   [Fail-safe window]
   │                │                      │
   │   you can recover it       only Snowflake support
   │   - UNDROP                 can recover it
   │   - SELECT ... AT/BEFORE   (best effort)
   │   - CREATE ... CLONE ... AT/BEFORE
   │                │                      │
   │    1-90 days (configurable)  7 days (fixed)
   ├──────────────────┤──────────────────────┤
                                             │
                                     protection ends -> data permanently deleted

Time Travel vs. Fail-safe Comparison

AspectTime TravelFail-safe
Who controls itUser (self-service)Snowflake (via Support)
Protection period0-90 days (set via DATA_RETENTION_TIME_IN_DAYS)7 days (fixed, cannot be changed)
Recovery methodUNDROP / SELECT ... AT|BEFORE / CLONE ... AT|BEFORERequest via Snowflake Support
Recovery guaranteeGuaranteed (recovery is certain within the period)Best-effort (no guarantee)
Starts whenImmediately after data changeAfter the Time Travel period ends
Storage costCharged for the retained pre-change dataCharged for the retained pre-change data
Applicable table typesPermanent / Transient / TemporaryPermanent only
Configuration parameterDATA_RETENTION_TIME_IN_DAYSNone (applied automatically)

Protection Periods by Table Type

Time Travel and Fail-safe periods differ by table type. Choosing the right table type is essential for balancing cost optimization with data protection.

Table typeTime Travel (max)Fail-safeTotal max protectionPrimary use case
Permanent(Standard Edition)1 day7 days8 daysProduction data
Permanent(Enterprise Edition+)90 days7 days97 daysProduction data
Transient1 day0 days1 dayStaging / intermediate processing
Temporary1 day0 days1 dayWithin-session temporary processing

Characteristics of Each Table Type

-- Permanent table (the default)
CREATE TABLE production_data (
  id NUMBER,
  data VARIANT
);
-- Time Travel: up to 90 days (Enterprise+), Fail-safe: 7 days

-- Transient table
CREATE TRANSIENT TABLE staging_data (
  id NUMBER,
  raw_json VARIANT
);
-- Time Travel: up to 1 day, Fail-safe: none

-- Temporary table
CREATE TEMPORARY TABLE session_temp (
  key STRING,
  value STRING
);
-- Time Travel: up to 1 day, Fail-safe: none
-- Dropped automatically when the session ends

-- Set the Time Travel retention period
ALTER TABLE production_data
  SET DATA_RETENTION_TIME_IN_DAYS = 90;

-- Check a table's retention period
SHOW TABLES LIKE 'production_data';
-- -> shown in the retention_time column

Impact on Storage Cost

Both Time Travel and Fail-safe retain the pre-change data (older micro-partitions), so they incur additional storage charges.

Where storage cost goes:

[Active storage]           <- the current table data
         +
[Time Travel storage]      <- pre-change micro-partitions (for the configured window)
         +
[Fail-safe storage]        <- data after the Time Travel window (7 days)
         =
[Total storage cost]

* The more often a table is UPDATEd or DELETEd, the larger its Time Travel and Fail-safe storage
* INSERT-only tables incur almost no additional storage
-- Check storage usage
SELECT
  TABLE_NAME,
  ACTIVE_BYTES / (1024*1024*1024) AS active_gb,
  TIME_TRAVEL_BYTES / (1024*1024*1024) AS time_travel_gb,
  FAILSAFE_BYTES / (1024*1024*1024) AS failsafe_gb,
  (ACTIVE_BYTES + TIME_TRAVEL_BYTES + FAILSAFE_BYTES) / (1024*1024*1024) AS total_gb
FROM SNOWFLAKE.ACCOUNT_USAGE.TABLE_STORAGE_METRICS
WHERE TABLE_CATALOG = 'MY_DB'
ORDER BY total_gb DESC
LIMIT 20;

Time Travel Operations

-- Read the data as of a past point in time (AT clause)
SELECT * FROM sales
  AT(TIMESTAMP => '2026-03-20 10:00:00'::TIMESTAMP);

-- Read the data as of a given time ago (OFFSET)
SELECT * FROM sales
  AT(OFFSET => -3600);  -- one hour ago

-- Read the data as it was before a given statement (BEFORE clause)
SELECT * FROM sales
  BEFORE(STATEMENT => '01b2c3d4-0001-a234-0000-00000000beef');

-- Restore a dropped table
UNDROP TABLE deleted_sales;

-- Clone as of a past point in time
CREATE TABLE sales_backup CLONE sales
  AT(TIMESTAMP => '2026-03-20 10:00:00'::TIMESTAMP);

How UNDROP Works

UNDROP only works within the Time Travel window. If an object with the same name already exists, UNDROP fails.

  • UNDROP TABLE: restores a dropped table
  • UNDROP SCHEMA: restores a dropped schema (and all of its tables)
  • UNDROP DATABASE: restores a dropped database
  • If an object with the same name exists, you must RENAME it first

Data Encryption

As the third pillar of CDP, Snowflake automatically encrypts all data using AES-256.

Encryption layerDescriptionEdition
Encryption at restData on storage is encrypted with AES-256All editions
Encryption in transitNetwork encryption via TLS 1.2All editions
Hierarchical key managementRoot key → account key → table key hierarchyAll editions
Periodic key rotationSnowflake rotates keys automaticallyAll editions
Tri-Secret Secure (customer-managed keys)Combines a customer KMS key with the Snowflake keyBusiness Critical

Key Points for the Exam

  • Fail-safe is fixed at 7 days and cannot be changed; recovery is best-effort via Snowflake Support
  • Time Travel allows self-service recovery by users (UNDROP / AT / BEFORE / CLONE)
  • Transient and Temporary tables do not have Fail-safe applied (0 days)
  • On Enterprise Edition or higher, Permanent tables can be configured with up to 90 days of Time Travel
  • On Standard Edition, Time Travel maxes out at 1 day
  • If a table with the same name already exists, UNDROP fails
  • The Fail-safe period begins after the Time Travel period ends

Sample Question

Fail-safe / CDP

Question 1

Which statement is correct regarding Time Travel and Fail-safe for a Transient table created on Enterprise Edition?

  1. A. Up to 90 days of Time Travel plus 7 days of Fail-safe, for a combined maximum of 97 days of protection
  2. B. Up to 1 day of Time Travel plus 7 days of Fail-safe, for a combined maximum of 8 days of protection
  3. C. Up to 1 day of Time Travel plus 0 days of Fail-safe, for a combined maximum of 1 day of protection
  4. D. Up to 90 days of Time Travel plus 0 days of Fail-safe, for a combined maximum of 90 days of protection

Correct answer: C

Regardless of edition, Transient tables max out at 1 day of Time Travel and have 0 days of Fail-safe (none applied). Only Permanent tables can be configured with up to 90 days of Time Travel on Enterprise Edition or higher. The maximum combined protection period for a Transient table is 1 day.

Frequently Asked Questions

Can users directly access Fail-safe data?

No. Users cannot directly access Fail-safe data. Fail-safe is a disaster-recovery protection layer managed entirely by Snowflake. If you need to recover data from it, you must contact Snowflake Support and request the recovery. The only data users can self-restore via UNDROP or AT/BEFORE is data still within the Time Travel window.

Is there a way to reduce Fail-safe storage costs?

The Fail-safe period itself (7 days) cannot be changed. The key to reducing storage costs is choosing the right table type. Transient tables have 0 days of Fail-safe and Temporary tables also have 0 days, so using these table types for staging or intermediate-processing tables lets you avoid Fail-safe storage charges entirely.

What is the maximum combined protection period of Time Travel plus Fail-safe?

For Permanent tables on Enterprise Edition or higher, you get up to 90 days of Time Travel plus 7 days of Fail-safe, for a combined maximum of 97 days of protection. On Standard Edition, Time Travel maxes out at 1 day, so the combined maximum is 8 days. Transient tables max out at 1 day of Time Travel plus 0 days of Fail-safe (1 day total), and Temporary tables also have at most 1 day of Time Travel plus 0 days of Fail-safe — but Temporary tables themselves are dropped when the session ends.

Check what you learned with practice questions

Practice with certification-focused question sets

Try free questions
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Snowflake

Snowflake Certifications: All 11 Exams Explained (2026)

Every SnowPro certification — Associate, Core, Specialty, Ad...

Snowflake

Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)

All 11 SnowPro exams ranked by difficulty with study-time es...

Snowflake

Snowflake Study Guide: Fastest Pass Route by Exam (2026)

How to pass SnowPro certifications efficiently — official ma...

Snowflake

SnowPro Core (COF-C03): Complete Exam Guide (2026)

Pass the SnowPro Core exam — six domains, scope, sample ques...

Snowflake

SnowPro Associate Platform (SOL-C01): Complete Guide (2026)

The entry-level SnowPro Associate exam — scope, weighting, s...

Browse all Snowflake articles (103)
© 2026 NicheeLab All rights reserved.