Get startedGet started for free

Data Protection and Business Continuity

1. Data Protection and Business Continuity

We've previously covered Time Travel, Fail-Safe, and zero-copy cloning. This video goes deeper on those as operational tools, then focuses on replication and failover groups — Snowflake's mechanisms for keeping data consistent across accounts and regions, and for keeping Claro running if a region goes down.

2. The Business Continuity Problem

Data protection covers a spectrum of risks. An analyst accidentally deletes records - Time Travel handles that. A cloud region experiences an outage and Claro's account becomes unavailable - failover groups handle that. Claro's EU users need data that only exists in a US account - replication handles that. The tools are different because the risks are different.

3. Time Travel and Fail-Safe

Time Travel lets you query or restore data using AT or BEFORE syntax with a timestamp, offset, statement ID, or stream. The window depth depends on your edition — Standard offers one day, Enterprise up to ninety. The window is configurable per object. Beyond Time Travel sits Fail-Safe: the seven-day buffer after the Time Travel window closes. Fail-Safe is not self-service — you contact Snowflake Support, and recovery is best-effort, not a guaranteed SLA.

4. Zero-Copy Cloning: Operational Patterns

Before any operation that could go wrong, clone it. Before Claro's team runs a bulk migration on a production table, they clone it first — an instant copy with no storage overhead at creation. If the migration fails, the clone is there to restore from. Clones also promote data between environments without duplicating underlying data. Once a clone exists, it's fully independent — writes to the clone don't touch the source.

5. What is Replication?

Replication copies data across account boundaries. Claro's primary US account replicates databases to target accounts in other regions or cloud providers. Replication is asynchronous — the target is near-real-time but not a live mirror. For Claro: a disaster recovery copy in a separate region, data residency compliance with EU data in an EU account, and improved read performance for regional teams querying a local copy.

6. Replication Groups

Replication is managed through replication groups — named collections of databases that replicate together. Either all refresh, or none do. Claro's primary US-East account holds two databases bundled into a group. The secondary EU-West account holds read-only replicas. Replication triggers manually with REFRESH or on a defined schedule. Secondary databases are read-only: queryable but not writable.

7. Creating a Replication Group

On the primary account, create the replication group, specify which databases to include, and define which target accounts can replicate it. On the secondary account, create a replica using AS REPLICA OF, referencing the primary account and group name. Trigger refreshes with the ALTER REPLICATION GROUP REFRESH command. The primary controls what's in the group; the secondary controls when it refreshes.

8. Failover Groups: What They Add

A failover group builds on replication groups but adds one critical capability: promoting a secondary to primary. In a replication group, the secondary is always read-only. In a failover group, if the primary goes down, the secondary can be promoted — it becomes writable and takes over as source of truth. Failover groups also replicate account objects: users, roles, warehouses, resource monitors, and integrations.

9. Planned Failover and Failover Mechanics

There's two ways to promote a secondary. A planned failover is where the primary is still available. In one operation, it steps down and the secondary takes over as primary. This is a clean handoff with no data loss. A failover is unplanned - the primary is unavailable, so the secondary promotes immediately. Because replication is asynchronous, any changes after the last refresh won't be in the secondary. That lag represents potential data loss - which is why refresh frequency is a key design decision.

10. Let's practice!

Now it's your turn. The exercises ahead will test your understanding of replication, failover groups, and Snowflake's data protection tools.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.