# Why is Kopia uploading files when no files have changed in the source?

**URL:** <https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190>\
**Category:** Support\
**Created:** [June 5, 2022, 4:56pm UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190 "2022-06-05T16:56:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [June 5, 2022, 4:56pm UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/1 "2022-06-05T16:56:44Z")

</div>

I have KopiaUI set to snapshot every 15 mins. I have noticed that even when I change no files, KopiaUI is uploading 4.6 KB of data every snapshot. What is Kopia uploading if nothing has been changed?

EDIT: Here are an example of the two files KopiaUI is uploading every 15 mins, even though no files are being changed in the snapshot source. The two new files being uploaded every 15 mins are the `xn3_*` index files and the `q*` blobs The total file size is always 4.6KB if I do not change any files in my snapshot source.

 ![Capture](https://global.discourse-cdn.com/free1/uploads/kopia/original/1X/8efcc155e13f1019d804363c0d30e761632582fb.png)

EDIT2: KopiaUI confirms that no changed files are being uploaded (see Hashed Files 0) but yet 4.6KB of uploaded bytes (of the two files referenced above):

 ![Untitled](https://global.discourse-cdn.com/free1/uploads/kopia/original/1X/fe749a29d28283fde8caff2dcee1a178307a062c.png)

---

<div class="post-metadata">

**Author:** ![kopanla](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kopanla/32/243_2.png) [@kopanla](https://kopia.discourse.group/u/kopanla)\
**Post date:** [June 6, 2022, 11:47am UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/2 "2022-06-06T11:47:33Z")

</div>

Every time you run `kopia snapshot ...` a snapshot is actually created. The information of that snapshot is saved in your repo. According to the documentation x files are “indices” and q files are “meta data”. So no “content data” is stored according to your information.

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [June 6, 2022, 12:31pm UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/3 "2022-06-06T12:31:15Z")

</div>

I am guessing this is being done for snapshot retention purposes. Is there no way for Kopia to keep track of empty snapshots without junking up the repo with empty snapshot files? If someone were to run a snapshot every 10 mins, that is 12 unnecessary files being created an hour if there are no files changed in the source.

---

<div class="post-metadata">

**Author:** ![ZebCorp](https://avatars.discourse-cdn.com/v4/letter/z/5fc32e/32.png) [@ZebCorp](https://kopia.discourse.group/u/ZebCorp)\
**Post date:** [June 6, 2022, 12:54pm UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/4 "2022-06-06T12:54:04Z")

</div>

Backup software must keep somewhere its data. Kopia stores in the destination. Some other software, for example Dupliacti, creates a local database in the source. Having local database causes, imho, more problems than its solves. Possible corruption, various forms of mismatches, problems with rebuild database etc. etc. Kopia solution is more elegant, practical and safer in the long run - you can plugin any time your backup repository and voila…

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [June 6, 2022, 1:49pm UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/5 "2022-06-06T13:49:09Z")

</div>

I do not disagree with this. What I am saying is, there surely must be someway to keep track of empty snapshots without creating junk files in the repo? For example, maybe one file in the repo that keeps track of all retained snapshots. This file can be updated when the snapshot is empty. This would keep the repo clean.

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [June 7, 2022, 4:47am UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/6 "2022-06-07T04:47:36Z")

</div>

If Kopia always uploads one index and one blob for every snapshot even when no files in the source have been changed, then it a bug that, occasionally, for some snapshots Kopia uploads nothing? Maybe worth getting @jkowalski to chime in here, just in case this is a bug. Sorry if this is intended behavior!

 ![Untitled](https://global.discourse-cdn.com/free1/uploads/kopia/original/1X/6afaabe2859feb6121eb2fa8a73ba1b40642ff00.png)

---

<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:** [June 8, 2022, 5:18am UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/7 "2022-06-08T05:18:45Z")

</div>

Yeah, all this is to track empty snapshots, which will always create a manifest entry. `q` blob stores manifest payload JSON and `x` blob is an index entry.

It should be possible to add a feature (and new policy setting to control it) that avoids tracking unchanged snapshots altogether.

Given current architecture this should actually be quite easy to do. Basically, one should be able to add logic to avoid calling `snapshot.SaveSnapshot` for identical snapshots. This needs to be done twice - in the CLI mode (command\_snapshot\_create.go) and in the server mode (`source_manager.go`).

I’ll be happy to review pull requests for this. This should be a fun small change.

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [June 9, 2022, 3:27am UTC](https://kopia.discourse.group/t/why-is-kopia-uploading-files-when-no-files-have-changed-in-the-source/1190/8 "2022-06-09T03:27:07Z")

</div>

> [@jkowalski](#):
>
> Yeah, all this is to track empty snapshots, which will always create a manifest entry. `q` blob stores manifest payload JSON and `x` blob is an index entry.
> 
> It should be possible to add a feature (and new policy setting to control it) that avoids tracking unchanged snapshots altogether.
> 
> Given current architecture this should actually be quite easy to do. Basically, one should be able to add logic to avoid calling `snapshot.SaveSnapshot` for identical snapshots. This needs to be done twice - in the CLI mode (command\_snapshot\_create.go) and in the server mode (`source_manager.go`).
> 
> I’ll be happy to review pull requests for this. This should be a fun small change.

If anyone decides to tackle this, it would be greatly appreciated if the policy setting can be available in KopiaUI, too. Thank you!
