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:
- sync (??) < 1s
- take snapshot < 1s (atomic?)
- 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?
Some useful comments from Eric Hammond in another thread:
So from my understanding of Oracle’s somewhat more robust
ALTER DATABASE BEGIN BACKUPoperation I will prefer to wait until the snapshot is complete (not pending) to issue the closingALTER DATABASE END BACKUP.