Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Snapshot size is 0B

Hey guys when i create snapshots using snapshot scheduler why does it create snapshots of size 0B which is alike from manual creation

0 4 918
4 REPLIES 4

Hi,

Compute Engine uses incremental Snapshots, so each snapshot contains only the data that has changed since the previous Snapshot.  The size associated with a snapshot refers to the amount of new or modified data since the previous snapshot.  If there were no changes between the first and the second snapshot to the data on the disk, then the second snapshot may report as 0B.  Could that be what you are seeing?

Hope that helps,

Alex

If the first snapshot itself is of  0B.This is because I had taken an instant snapshot of a disk and it was the first snapshot but I see the size to be 0B

Hi, Alex

If I create a disk of the last snapshot, it would use all the previous ones to recreate the disk entirely? 

And what happens when a snapshot is deleted? The next will fully backup the disk?

My concern is with database consistency. 

Hi @vitvitvit

If you create a disk from the latest snapshot, yes it would use all the previous ones to recreate it entirely. By this I mean only data that is not in the latest snapshot would be used to restore.
This is achieved by the incremental snapshot mechanism.
Snapshot(3) considering it's the latest one, will have "reference" to its previously taken snapshots (1) & (2) for any unchanged data.


When you delete a GCP snapshot that has dependent snapshots, GCP manages the data to maintain the consistency of the backups. Any data required to "restore", subsequent snapshots is "automatically moved into the next snapshot" in the chain, which increases its size. Conversely, data that is no longer needed is deleted.

Hope this helps!!

for more details check these pages here:
https://cloud.google.com/compute/docs/disks/snapshots#incremental-snapshots
https://cloud.google.com/compute/docs/disks/snapshots#snapshot_deletion