Skip to main content

🧠 Time Travel & Recovery

Snowflake provides powerful, architecture-driven capabilities for data protection, cloning, and collaboration.
These features are possible because of Snowflake’s immutable micro-partition storage, metadata services, and separation of compute and storage.

In this section, we explore four core architectural capabilities:

  • ⏱️ Time Travel
  • πŸ›‘οΈ Fail-Safe
  • 🧬 Zero-Copy Cloning
  • πŸ”— Data Sharing

⏱️ Time Travel – Rewind Your Data​

Architecture Mapping β†’ Storage Layer + Cloud Services Layer

Time Travel allows accessing historical versions of data for a defined retention period.
It is essential for recovering accidentally deleted objects, comparing current vs past states, and performing historical analysis.

βœ… How It Works (Architecturally)​

  • Storage Layer β†’ Maintains immutable micro-partition versions
  • Cloud Services Layer β†’ Tracks metadata, timestamps, transactions

πŸ” Key Features:​

  • Restore dropped tables, schemas, databases
  • Query data β€œas of” a timestamp or offset
  • Recover overwritten or deleted data

πŸ•’ Retention Periods:​

  • Standard Edition β†’ 1 day
  • Enterprise+ Editions β†’ Up to 90 days (configurable)

πŸ’‘ Example:​

-- View table data as it existed 1 day ago
SELECT * FROM orders AT (OFFSET => -1);

-- Restore a dropped table
UNDROP TABLE orders;

πŸ›‘οΈ Fail-Safe – Emergency Recovery Mechanism

Architecture Mapping β†’ Storage Layer (Deep Recovery) + Cloud Services

Fail-Safe is Snowflake’s final layer of protection when Time Travel retention has expired. It is used only during severe data-loss scenarios.

🧩 How It Works:​

  • Storage Layer β†’ Retains encrypted historical snapshots
  • Cloud Services β†’ Controls internal-only recovery workflow

πŸ” Key Highlights:​

  • Provides an additional 7-day recovery window
  • Managed only by Snowflake Support
  • Not directly user accessible
  • Designed for disaster recovery, not routine restores

🚫 Limitations:​

  • ❌ Cannot query data in Fail-Safe
  • ❌ Cannot restore specific objects manually
  • ❌ Requires Snowflake Support intervention

πŸ’¬ β€œFail-Safe is not for convenience β€” it’s for catastrophe.”


🧬 Zero-Copy Cloning – Instant, Storage-Efficient Clones

Architecture Mapping β†’ Storage Layer + Metadata Services

Zero-Copy Cloning enables instant creation of full clones of databases, schemas, or tables without duplicating physical data.

πŸ” Why It Works:​

  • Storage Layer β†’ Uses immutable micro-partition versions
  • Metadata Layer β†’ Clones only reference existing partitions

Only when data in either object changes does Snowflake create new partitions.

⭐ Highlights:​

  • ⚑ Instant clone creation
  • πŸ’Έ No additional storage cost initially
  • πŸ§ͺ Ideal for Dev/Test or what-if analysis
  • πŸ”„ Safe experimentation without touching production

πŸ’‘ Example:​

CREATE TABLE orders_clone CLONE orders;
CREATE SCHEMA dev_sales CLONE prod_sales;

πŸ”— Data Sharing – Seamless, Secure Collaboration

πŸ”— What is Data Sharing in Snowflake?​

Data Sharing in Snowflake is a feature that allows organizations to share live, real-time data with other Snowflake accounts without copying, moving, or transferring the data.

Instead of sending files, exports, or ETL pipelines, Snowflake shares secure metadata pointers to the data stored in your account.

πŸ” Types of Data Sharing & How They Work Architecturally​


1️⃣ Direct Data Sharing (Account-to-Account Sharing)​

Share live data with another Snowflake account without copying.

πŸ—οΈ How It Works Architecturally​

  • Storage Layer

    • Data stays in the provider’s storage; no duplication.
  • Cloud Services Layer

    • Manages metadata sharing via β€œshares”.
    • Controls access (GRANT, REVOKE, privileges).
  • Compute Layer

    • Consumer uses their own Virtual Warehouse to query shared data.

πŸ”‘ Key Concept​

➑️ Provider shares only metadata pointers, not data.


2️⃣ Private Sharing (Private Listings)​

Share curated datasets privately with selected customers or partners using Marketplace infrastructure.

πŸ—οΈ How It Works Architecturally​

  • Storage Layer

    • Provider’s data remains in their account.
  • Cloud Services Layer

    • Creates a private listing linked to a share object.
    • Controls visibility of the listing to selected accounts.
  • Compute Layer

    • Consumer runs queries with their warehouse.

πŸ”‘ Key Concept​

➑️ A listing is just a controlled metadata wrapper around a share.


3️⃣ Public Sharing (Snowflake Marketplace / Public Listings)​

Publish datasets that any Snowflake customer can discover and subscribe to.

πŸ—οΈ How It Works Architecturally​

  • Storage Layer

    • Data remains stored once; Marketplace does not duplicate it.
  • Cloud Services Layer

    • Handles marketplace catalog, entitlement, and subscription logic.
    • Maps subscriptions to underlying share objects.
  • Compute Layer

    • Each subscriber queries data using their own compute.

πŸ”‘ Key Concept​

➑️ Marketplace uses the same sharing architecture with an added discovery/catalog layer.


4️⃣ Cross-Region Data Sharing (with Replication)​

Share data from one Snowflake region to another (e.g., AWS us-east-1 β†’ eu-west-2).

πŸ—οΈ How It Works Architecturally​

  • Storage Layer

    • Database replication creates physical copies of micro-partitions in another region.
    • Replication happens automatically & incrementally.
  • Cloud Services Layer

    • Manages replication schedules, versioning, metadata sync.
    • Ensures consistent state across regions.
  • Compute Layer

    • Consumers still use their own warehouse.

πŸ”‘ Key Concept​

➑️ Replication enables live data sharing even when regions are isolated.


5️⃣ Cross-Cloud Sharing (AWS ↔ Azure ↔ GCP)​

Share data across different cloud platforms.

πŸ—οΈ How It Works Architecturally​

  • Storage Layer

    • Database replication copies micro-partitions to the target cloud.
    • Snowflake abstracts underlying cloud differences.
  • Cloud Services Layer

    • Manages encryption, metadata sync, cross-cloud identity mapping.
  • Compute Layer

    • Consumers compute on their cloud’s Snowflake region.

πŸ”‘ Key Concept​

➑️ Cross-cloud sharing = replication + metadata-based access control.


6️⃣ Reader Accounts (For Users Without Snowflake)​

Provide live shared data to partners who do not have a Snowflake account.

πŸ—οΈ How It Works Architecturally​

  • Storage Layer

    • Data remains in the provider’s storage.
  • Cloud Services Layer

    • Provider creates a β€œReader Account” (fully managed by provider).
    • Controls all metadata, security, and access.
  • Compute Layer

    • Providers pay for compute used by the reader account (because it belongs to the provider).

πŸ”‘ Key Concept​

➑️ Provider controls compute + storage for the consumer.


🎯 Final Summary Table β€” Data Sharing Architecture

Sharing TypeStorage LayerCloud Services LayerCompute LayerNotes
Direct SharingData stays with providerManages metadata sharesConsumer uses own computeNo data movement
Private SharingSame as DirectListing + entitlementConsumer computePrivate visibility
Public MarketplaceSameListing catalog + subscriptionConsumer computePublic listing
Cross-RegionReplication requiredMetadata + syncConsumer computeMulti-region
Cross-CloudReplication across cloudsSecurity + syncConsumer computeMulti-cloud
Reader AccountsProvider storageProvider manages reader accountProvider computeFor non-Snowflake users

🎯 Final Summary

FeaturePurposeUser Access?DurationKey Benefit
⏱️ Time TravelRestore/query historical dataYes1–90 daysFlexible recovery
πŸ›‘οΈ Fail-SafeEmergency deep recoveryNo7 daysDisaster protection
🧬 Zero-Copy CloningInstant environment copiesYesPermanentCost-efficient, fast
πŸ”— Data SharingSeamless external collaborationYesPermanentShare without copying

❓ Frequently Asked Questions (FAQ)

Below are Few FAQs covered in this module.


  • Time Travel
  • Fail-Safe
  • Zero-Copy Cloning
  • Data Sharing

1. What is the difference between Time Travel and Fail-Safe?

⏱️ Time Travel​

  • User-accessible
  • Allows querying or restoring past data
  • Retention: 1–90 days

πŸ›‘οΈ Fail-Safe​

  • Not user-accessible
  • Used only for emergencies
  • Duration: 7 days after Time Travel

➑️ Time Travel = convenience ➑️ Fail-Safe = catastrophic recovery


2. Does Zero-Copy Cloning create a full physical copy?

No. Zero-Copy Cloning uses metadata pointers to reference existing micro-partitions. Data is copied only when modified after cloning.


3. Is Data Sharing secure, and how is access controlled?

Yes β€” Data Sharing is highly secure.

  • No data copies or movement
  • Consumers use read-only access
  • Providers control access using shares + GRANT privileges
  • Access can be revoked immediately

4. Does Time Travel increase storage usage and cost?

Yes. The longer the retention period, the more historical micro-partitions Snowflake keeps. Workloads with frequent updates generate more retained history β†’ more cost.


5. Can Fail-Safe be disabled or customized?

No. Fail-Safe is:

  • Mandatory
  • Fully managed by Snowflake
  • Always 7 days
  • Not configurable

It is part of Snowflake’s internal disaster-recovery design.


6. Does a cloned object inherit Time Travel history?

Yes. A Zero-Copy Clone inherits the full Time Travel history of the source at the time of cloning. After that, both objects maintain their history separately.


7. Are permissions copied when I create a clone?

No. Cloning copies:

  • Data
  • Structure

But does NOT copy:

  • Privileges
  • GRANT roles
  • Access rights

You must reassign permissions to the clone.


8. Is Data Sharing read-only for consumers?

Yes. Consumers can only:

  • Query data
  • Create their own views on top of shared data

They cannot:

  • Insert
  • Update
  • Delete
  • Alter the provider’s data

Data Sharing is always read-only.


9. Can I clone objects across databases or environments?

Yes. Zero-Copy Cloning works across:

  • Schemas
  • Databases
  • Environments (e.g., DEV β†’ QA β†’ PROD)

Example:

CREATE TABLE qa.sales.orders_clone CLONE prod.sales.orders;

10. Can Data Sharing be used across different clouds or regions?

Yes. Snowflake supports cross-cloud and cross-region sharing between:

  • AWS
  • Azure
  • GCP

This requires replication but still provides live, real-time shared data.