user13492282
user13492282

Reputation: 145

Snowflakes -Difference between time traveldata_retention_time_in_days and fail safe

Time travel: Helps the user to query the data ,how does it looks some time before and we can query, restore the previous state of the table.

Fail safe: internally used by snowflakes to restore the data during the times of hardware failure.

Its hypothetical (asking this question to understand the time travel and fail safe better)

Question 1

say we have hardware failure and system was down on friday night and we realised the hardware failure on monday morning. I have my time travel setting as 1 day-data_retention_time_in_days. In this case can I get the data back same as on Friday before the failure on restart?

Question 2

Will it be possible? If we have time data_retention_time_in_days as 6 and default fail safe is ( 7 days). In this case on a hardware failure if i like to restore the database to a point where, how it was 10 days back?

Example: 6 days time travel + 7 days fail safe say on May 20 if I decided to restore the database to a point how it was on May 10.

Upvotes: 1

Views: 1875

Answers (2)

Palash Chatterjee
Palash Chatterjee

Reputation: 196

This is really interesting bit , three core concepts

  1. Time travel, user can set and retrieve data going back to history, based on their snowflake edition and object or account specific time travel (day-data_retention_time_in_days) setup.
  2. Fail safe , user does not have control on retrieval of data applicable only after time travel period is over . In this scenario only Snowflake support can help up til 7 days only. So if you have set time travel as 6 days (Assuming) then you yourself can retrieve db objects after the transaction execution + 6 days of time. from 7th to 13th days post transaction execution snowflake support can help to retrieve your objects. After 13th days objects can not be retrieved or restored back
  3. Snowflake is an ideal SaaS so target cloud platform/services up-time is not users responsibility, snowflake SLA says 99.9 percent services availability. One need to setup the time travel based on their organization backup and restore policies.

now coming to your question

1 : You are not loosing data , you are loosing the previous state of the objects . Something had happened on Friday and realized on Monday morning (if the time travel set to 1) you yourself can not get the object state back similar to what it was on Friday. If you need to retrieve the sate , snowflake support would be the answer.

2 : if you want to restore the object state how it was 10 days back and your setup of time travel is 6 days , then again you need help of snowflake support.

The base concept here as per CDP (continuous data protection ) .

Snowflake Account User can restore the state back based on your time travel days(Assume X)

Snowflake Support can restore the object state back if it is within the time-frame of X+7

Upvotes: 0

Mike Walton
Mike Walton

Reputation: 7339

Question 1: If you are expecting "hardware failure" on Snowflake's system, you may want to read the following documentation: https://docs.snowflake.com/en/user-guide/intro-key-concepts.html. Your question tends to lean towards older on-prem systems, but to your question about time-travel and how it works. If you have everything set to 1-day for time-travel, then you can restore any table or all tables back to any point in time up to 1-day in the past.

Question 2: Yes, but in this case you'd need to contact Snowflake Support. You have no access to the Fail-safe data, so Snowflake Support would need to restore your data from the information in fail-safe.

You may also be interested in this documentation on both time-travel and fail-safe from the Snowflake documentation (which is excellent, btw!). https://docs.snowflake.com/en/user-guide/data-availability.html

Upvotes: 2

Related Questions