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?
feita há 9 meses557 visualizações
2 Respostas
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
MODERADOR
philaws
respondido há 9 meses
    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
ESPECIALISTA
respondido há 9 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas