Reed Sandberg
Reed Sandberg

Reputation: 731

Anatomy of an EBS snapshot for Oracle db begin/end backup

No luck asking this question on the AWS forum, so will try my luck here:

My rough understanding of the sequence of events during an EBS snapshot:

  1. sync (??) < 1s
  2. take snapshot < 1s (atomic?)
  3. copy to S3 the snapshot or any incremental differences from the previous snapshot of this volume (if any) < 1hr (hopefully)

Please add any additional steps here, most importantly I'm asking about the actual snapshot event #2 above: Can I rely on this to be a short event (< 1s)? Is it an atomic operation within the block device? How do I know for certain when it is complete (when the ec2-create-snapshot command returns success)? What does the pending state refer to (just the copy process)?

In short, can I safely do: ALTER DATABASE BEGIN BACKUP ec2-create-snapshot ALTER DATABASE END BACKUP

or do I have to wait until the snapshot process is completely available (not pending) to END BACKUP?

Upvotes: 1

Views: 1097

Answers (1)

Reed Sandberg
Reed Sandberg

Reputation: 731

Some useful comments from Eric Hammond in another thread:

After you initiate the creation of the snapshot, your application/database is free to use the file system on the volume, but if you have a lot of writes, you could experience high iowait, sometimes enough to create a noticeable slowdown of your application. The reason for this is that the background snapshot process needs to copy a block to S3 before it will allow a write to that block on the active volume.

So from my understanding of Oracle's somewhat more robust ALTER DATABASE BEGIN BACKUP operation I will prefer to wait until the snapshot is complete (not pending) to issue the closing ALTER DATABASE END BACKUP.

Upvotes: 0

Related Questions