Compare the GCP Cloud Storage classes.
Cloud Storage classes trade storage cost for retrieval cost and minimum storage duration.
- Standard: frequent access, no minimum duration. Best for hot data and serving websites.
- Nearline: accessed less than once a month, 30-day minimum.
- Coldline: accessed less than once a quarter, 90-day minimum.
- Archive: accessed less than once a year, 365-day minimum, and the lowest storage price.
All classes offer millisecond access and the same durability; only cost and minimum duration differ. Set the class at upload or let Autoclass move objects automatically based on access.
gcloud storage cp logs/*.gz gs://my-bucket/logs/ \
--storage-class=NEARLINE
gcloud storage buckets update gs://my-bucket --lifecycle-file=lifecycle.json
Lifecycle rules can transition or delete objects. Beware early-deletion charges if you move data before the minimum duration elapses.