# GCP Old Disk Snapshot

> Flags Compute Engine snapshots at least 90 days old and prices their stored gigabytes at the snapshot storage rate.

Source: https://zop.dev/integrations/gcp/recommendations/gcp-old-disk-snapshot

---

## Snapshot storage bills until the snapshot is deleted

Google's [disk and image pricing](https://cloud.google.com/compute/disks-image-pricing) says
standard snapshots "incur monthly storage charges as long as they exist in your project". The
charge is for the compressed data stored, not the size of the source disk, and snapshots are
incremental, so each one holds only what changed since the previous snapshot in the chain.

That makes old snapshots easy to ignore: each looks small, nobody remembers why it was taken,
and a project that snapshots before every release can build up a long tail of them.

## Listing snapshots older than 90 days

gcloud filters accept ISO 8601 durations, so this lists snapshots created more than 90 days ago
with their source disk and stored bytes:

```bash
gcloud compute snapshots list \
  --filter="creationTimestamp<-P90D" \
  --format="table(name,sourceDisk,storageBytes,creationTimestamp)"
```

To see every snapshot of one disk, filter on `sourceDisk`, as shown in
[Google's snapshot management guide](https://cloud.google.com/compute/docs/disks/manage-snapshots).

## Age is the trigger, not existence

ZopNight reads each snapshot's creation time and fires once the snapshot is at least 90 days old.
A snapshot that exists but is younger than that is never flagged, however many there are, and
there is no size threshold.

## Snapshots it does not report

If the creation time is missing or cannot be read, the snapshot is skipped rather than assumed
old. If ZopNight has no storage size or no per-GB rate for the snapshot, it stays silent instead
of reporting a zero. Snapshots whose source disk has already been deleted are tracked as a separate
group in ZopNight's inventory and are not evaluated here.

## Pricing the saving from stored gigabytes

```text
saving = snapshot stored GB x per-GB-month snapshot storage rate for that snapshot
```

Treat it as an upper bound. Google notes that when you delete a snapshot in a chain, "some of
its data may move to the next incremental snapshot", which adds storage to that later snapshot.
Deleting the oldest snapshot of a disk that still has newer ones usually frees less than its
listed size.

## Clearing out stale snapshots

1. Check the snapshot's labels and description for a retention reason (audit, legal hold, golden image).
2. Confirm a newer snapshot of the same disk exists, or that the disk is gone and the data is not needed.
3. Delete it: `gcloud compute snapshots delete SNAPSHOT_NAME`.
4. Stop the pile from coming back by moving the disk to a snapshot schedule with
   `--max-retention-days`, as described on
   <a href="https://zop.dev/integrations/gcp/recommendations/gcp-persistent-disk-without-snapshot">GCP Persistent Disk Without Snapshot</a>.

**Warning**
Deleting a standard snapshot can be irreversible if the recycle bin is not enabled for it. Check before you delete one that holds critical data.
