Snowflake

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

2026-03-21
更新: 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のタイムライン:

 ← データ変更時点 ──────────────────────────────→ 時間経過

 [即時]          [Time Travel期間]      [Fail-safe期間]
   │                │                      │
   │   ユーザー自身で復旧可能    Snowflakeサポート
   │   - UNDROP                  のみ復旧可能
   │   - SELECT ... AT/BEFORE    (ベストエフォート)
   │   - CREATE ... CLONE ... AT/BEFORE
   │                │                      │
   │    1〜90日(設定次第)        7日間(固定)
   ├──────────────────┤──────────────────────┤
                                             │
                                     保護期間終了 → データ完全削除

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テーブル(デフォルト)
CREATE TABLE production_data (
  id NUMBER,
  data VARIANT
);
-- Time Travel: 最大90日(Enterprise+)、Fail-safe: 7日

-- Transientテーブル
CREATE TRANSIENT TABLE staging_data (
  id NUMBER,
  raw_json VARIANT
);
-- Time Travel: 最大1日、Fail-safe: なし

-- Temporaryテーブル
CREATE TEMPORARY TABLE session_temp (
  key STRING,
  value STRING
);
-- Time Travel: 最大1日、Fail-safe: なし
-- セッション終了時に自動削除

-- Time Travel保持期間の設定
ALTER TABLE production_data
  SET DATA_RETENTION_TIME_IN_DAYS = 90;

-- テーブルの保持期間を確認
SHOW TABLES LIKE 'production_data';
-- → retention_time カラムで確認

Impact on Storage Cost

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

ストレージ消費の内訳:

[アクティブストレージ]     ← 現在のテーブルデータ
         +
[Time Travelストレージ]    ← 変更前のマイクロパーティション(設定期間分)
         +
[Fail-safeストレージ]      ← Time Travel期間後のデータ(7日分)
         =
[合計ストレージ費用]

※ 頻繁にUPDATE/DELETEされるテーブルほどTime Travel/Fail-safeのストレージが大きくなる
※ INSERT ONLYのテーブルでは追加ストレージはほとんど発生しない
-- ストレージ使用状況の確認
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

-- 過去の時点のデータを参照(AT句)
SELECT * FROM sales
  AT(TIMESTAMP => '2026-03-20 10:00:00'::TIMESTAMP);

-- 指定時間前のデータを参照(OFFSET)
SELECT * FROM sales
  AT(OFFSET => -3600);  -- 1時間前

-- 特定のステートメント実行前のデータを参照(BEFORE句)
SELECT * FROM sales
  BEFORE(STATEMENT => '01b2c3d4-0001-a234-0000-00000000beef');

-- ドロップしたテーブルの復元
UNDROP TABLE deleted_sales;

-- 過去時点のクローンを作成
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

問題 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

正解: 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

無料で問題を解いてみる
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.