# Is Kopia retrieving data periodically?

**URL:** <https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736>\
**Category:** Support\
**Created:** [November 11, 2021, 1:20pm UTC](https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736 "2021-11-11T13:20:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NWBY](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/nwby/32/256_2.png) [@NWBY](https://kopia.discourse.group/u/NWBY)\
**Post date:** [November 11, 2021, 1:20pm UTC](https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736/1 "2021-11-11T13:20:39Z")

</div>

Hey, thank you for all the great work on Kopia.

I’m using Kopia to backup large amounts of data to S3, we’re talking roughly 11TB a month at the moment. AWS provide the data transfer into S3 for free, however the data transfer out is not free.

Currently, we’re not doing a lot of restores so there isn’t much need for data to be transferred out of AWS. However, the billing from AWS for the outwards data transfer is quite large and we’re roughly transferring out as much data as we’re currently transferring in. I have looked through the Kopia codebase and can’t find anything clear to show data being retrieved periodically or anything. But is there anything I’m missing, is Kopia doing a periodic refresh of data stored on S3? Or something similar?

Apologies if I’m completely barking up the wrong tree, just trying to figure it out.

Cheers

---

<div class="post-metadata">

**Author:** ![jkowalski](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/jkowalski/32/3_2.png) [@jkowalski](https://kopia.discourse.group/u/jkowalski)\
**Post date:** [November 11, 2021, 3:45pm UTC](https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736/2 "2021-11-11T15:45:43Z")

</div>

Kopia will generally only download index and metadata blobs (directory listings) and those are cached so will generally need to be downloaded once per connection, unless you’re discarding cache somehow.

Kopia will also periodically list index blobs to determine if there are new blobs to be downloaded.

Can you describe how you’re running Kopia (server mode?, containers? how many computers? are they always connected? are they connecting and disconnecting a lot?)

---

<div class="post-metadata">

**Author:** ![NWBY](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/nwby/32/256_2.png) [@NWBY](https://kopia.discourse.group/u/NWBY)\
**Post date:** [November 12, 2021, 10:41am UTC](https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736/3 "2021-11-12T10:41:59Z")

</div>

Thank you for your response @jkowalski.

The cache is limited to 1GB to save space and we’re running Kopia on Ubuntu servers that are always connected. They may reboot sometimes but not frequently. We’re talking 1800+ servers at the moment, we do manually delete old snapshots using the `kopia snapshot delete --delete` command, I wondered if this needed to download anything to delete a snapshot. Additionally, we’re running the maintenance command, does this do anything regarding downloading data?

---

<div class="post-metadata">

**Author:** ![jkowalski](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/jkowalski/32/3_2.png) [@jkowalski](https://kopia.discourse.group/u/jkowalski)\
**Post date:** [November 12, 2021, 2:53pm UTC](https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736/4 "2021-11-12T14:53:36Z")

</div>

You can see what’s going on using —log-level=debug and look for STORAGE. Let me know if you find a pattern that cannot be explained.

---

<div class="post-metadata">

**Author:** ![NWBY](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/nwby/32/256_2.png) [@NWBY](https://kopia.discourse.group/u/NWBY)\
**Post date:** [November 15, 2021, 12:11pm UTC](https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736/5 "2021-11-15T12:11:03Z")

</div>

Thank you for your suggestion @jkowalski

I think our issue is that we’re limiting the cache size to 1GB so then Kopia is downloading index and metadata blobs. Do you have a suggested cache size for amount of data being backed up? For example how much cache per 1GB of data being stored? I understand that there is many moving variables that could impact this, so if not then no worries at all.

---

<div class="post-metadata">

**Author:** ![jkowalski](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/jkowalski/32/3_2.png) [@jkowalski](https://kopia.discourse.group/u/jkowalski)\
**Post date:** [November 15, 2021, 3:55pm UTC](https://kopia.discourse.group/t/is-kopia-retrieving-data-periodically/736/6 "2021-11-15T15:55:41Z")

</div>

Kopia separates data (file contents) from metadata and operations such as deleting a snapshot only operate on metadata.

The `metadata` cache stores `q` blobs which store manifests (snapshots, policies) and directory listings. You can find out how much space the blobs need: `kopia blob stats --prefix=q`

To adjust, use something like this:

$ kopia cache set --metadata-cache-size-mb=5000
