# How snapshots works when using different Storage Class (GCS)?

**URL:** <https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [January 19, 2022, 1:56am UTC](https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753 "2022-01-19T01:56:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 19, 2022, 1:56am UTC](https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753/1 "2022-01-19T01:56:35Z")

</div>

Hello,

Currently I'm using snapshot repositories stored in Google Cloud Storage that was created with the `standard` storage class.

Now I have the need to create new snapshots on another Google Cloud project and I was thinking in using another storage class, like the `coldline` one as it is pretty rare for us to need to restore a snapshot, they are mostly for archival reasons, and the price difference between the `standard` and `coldline` could help us to reduce the costs.

But I have a few questions about how snapshots works under the hood and if it can impact the costs somehow.

While the storage price for data in the `coldline` storage class is 5 times cheaper than the price for the `standard` storage class, the costs for operations are doubled.

For example, 10,000 Class A operations costs $ 0.05 for the `standard` class and $ 0.10 for the `coldline` class, a similar thing happens for Class B operations.

From the [pricing page](https://cloud.google.com/storage/pricing#price-tables), Class A operations seems to be when you write or list something into the bucket and Class B seems to be when you get something from the bucket, so creating snapshots and sending data would be Class A operations and restoring would also envolve Class B operations.

For the `coldline` class there is also a minimum retention of 90 days and if a object is replaced in the bucket, additional charges happens.

How would this translate for the real world usage?

My use case is pretty simple, the majority of my indices are time based daily indices that does not have any update and the snapshots are also daily, I would assume that for daily indices after a snapshot is created, the new snapshot will only upload the new indices.

But some indices are monthly based, so the shards of those indices would change between snapshots as there are new documents, would this reflect as the objects being replaced in the google cloud?

Anyone has any experience with snapshots on GCS or any other cloud service with tiered storage class, that have a similar pricing pattern?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 21, 2022, 4:56pm UTC](https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753/2 "2022-01-21T16:56:41Z")

</div>

Since this is more related to the internals of how the snapshot and restore processes work, I've opened a ticket with the support.

But looking at our GCP Billing dashboard, the number of Class A and Class B operations can be ignored.

The question now is if it is safe to change the storage class from `standard` to `coldline` for existing objects in the bucket or if this can impact the snapshot in some way.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 21, 2022, 8:07pm UTC](https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753/3 "2022-01-21T20:07:39Z")

</div>

It should work correctly with coldline storage. It's hard to say whether it'll be cheaper or not since it depends on how you're using it.

There's an open issue to use different classes for different things on S3 which would also apply to GCS, and might give a bit more insight into the inner workings too:

> <https://github.com/elastic/elasticsearch/issues/81352>
>
> S3 offers a variety of storage tiers which allow users to trade storage cost (a …function of the volume of data stored) off against access cost (a function of the number of API calls made). Today the \`repository-s3\` plugins lets you select a storage tier for all your snapshot data. However there are really two different kinds of blob in the repository:
> 
> \- \*\*Metadata blobs\*\* are small and we read them when taking snapshots, deleting snapshots, listing the repository contents, and otherwise manipulating the repository. 
> 
> \- \*\*Data blobs\*\* hold the files that make up each snapshotted shard and therefore make up the bulk of the repository volume, but these are only read when restoring a shard or otherwise accessing its contents.
> 
> No one tier is best for all kinds of blob. I believe it would be better to keep metadata blobs in the tiers with lower access costs and data blobs in the tiers with lower storage costs. I think we should split the \`storage\_class\` setting into \`data\_storage\_class\` and \`metadata\_storage\_class\` settings to achieve this.
> 
> Relates https://github.com/elastic/elasticsearch/issues/81351 in that Glacier Instant Retrieval seems ideal for data blobs but is wholly inappropriate for metadata blobs.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 18, 2022, 8:07pm UTC](https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753/4 "2022-02-18T20:07:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
