While creating an RDS snapshot, we found that the snapshot contained dirty data

0
  1. We are creating an RDS snapshot and then immediately writing some data to the RDS instance; we found that the snapshot contained the data that was just written.

    • Why would this data be recorded in a recently created snapshot?
  2. Similarly, when we create a snapshot and wait for some time (such as: 3 min), then write data to the RDS instance, we will get a clean snapshot.

    • Why do we need to wait some time?
    • Will this "wait time" change as the amount of data in the RDS instance increases, or if there are changes in the cluster architecture?
已提問 9 個月前檢視次數 557 次
2 個答案
0

I am not sure what you mean here by clean and dirty snapshots. But I would disagree with the first answer here. An RDS snapshot is created immediately at the time of the request. It will produce a crash consistent copy of the database. So 'waiting three minutes' would write data that is not included in the snapshot. The first case, you must have written the data prior to requesting the snapshot.

AWS
管理員
philaws
已回答 9 個月前
    1. I understand snapshots save the current state of RDS immediately. After sending a request to create a snapshot, all subsequent operations on RDS should not be recorded in the snapshot. Through our test, after sending the request to create a snapshot, some data will be inserted into the RDS instance immediately, and these insertion operations will be recorded in the snapshot, I don't think this is as expected.

    2. When you create a snapshot on the RDS service, the snapshot's state is 'Creating'. If you immediately operate (such as inserting some data) on the RDS that's currently being backed up and these operations get recorded in the snapshot, this would lead to what's known as a 'dirty snapshot', because these operations should not be recorded into the snapshot. Conversely, if such operations are not included, it's described as a 'clean' snapshot.

0

A snapshot isnt instant. Depending on the size of the RDS it can take several minutes. Depending on when the snapshot starts and finishes will dictate what data is included.

Perform the same tests while monitoring the Snapshot screen of RDS to know when the snaphost has completed.

profile picture
專家
已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南