# How is error correction to be used?

**URL:** <https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641>\
**Category:** General Topics\
**Created:** [February 5, 2024, 9:40am UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641 "2024-02-05T09:40:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mabod](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mabod/32/941_2.png) [@mabod](https://kopia.discourse.group/u/mabod)\
**Post date:** [February 5, 2024, 9:40am UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/1 "2024-02-05T09:40:51Z")

</div>

Hi,

I am new to kopia and I am wondering how Reed–Solomon error correction is to be used. When I do the `kopia benchmark ecc` I get a recommendation saying:

`Fastest option for this machine is: --ecc=REED-SOLOMON-CRC32 - 2%`

But what do I do with that? How can I enable this? How can I check what the current value is? Is ecc used by default? I assume not, because the documentation says that this feature is experimental.

---

<div class="post-metadata">

**Author:** ![mabod](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mabod/32/941_2.png) [@mabod](https://kopia.discourse.group/u/mabod)\
**Post date:** [February 5, 2024, 9:48am UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/2 "2024-02-05T09:48:00Z")

</div>

I guess I found it. ecc is a feature of the repository and needs to be defined during repo creation.

```auto
      --ecc=ALGO [EXPERIMENTAL] Error correction algorithm.
      --ecc-overhead-percent=0 [EXPERIMENTAL] How much space overhead can be used for error correction, in percentage. Use 0 to disable ECC.

```

Does it make sense to use that if the repository is sitting on a filesystem that has checksums (zfs, btrfs)?

EDIT:  
One more question:  
the command `kopia repo status` does not tell if ecc is turned on for the repo.

I only see one status parameter which differs between ecc enabled and disabled:

With ecc:  
`Format version: 3`

Without ecc:  
`Format version: 2`

Is that the differentiator for ecc?

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [February 5, 2024, 10:55am UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/3 "2024-02-05T10:55:39Z")

</div>

> [@mabod](#):
>
> Does it make sense to use that if the repository is sitting on a filesystem that has checksums (zfs, btrfs)?

This is experimental and in your case totally pointless to use IMO.

> **[Error Correction Algorithm](https://kopia.io/docs/advanced/ecc/)**
>
> Fast and Secure Open-Source Backup Software for Windows, Mac, and Linux

---

<div class="post-metadata">

**Author:** ![mabod](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mabod/32/941_2.png) [@mabod](https://kopia.discourse.group/u/mabod)\
**Post date:** [February 5, 2024, 12:32pm UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/4 "2024-02-05T12:32:52Z")

</div>

I am also thinking that it does not make sense for me because my filesystem is zfs. Nevertheless it is interesting to understand how it works. The documentation doesn’t say a lot.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [February 5, 2024, 12:41pm UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/5 "2024-02-05T12:41:00Z")

</div>

> **[Reed–Solomon error correction](https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction)**
>
> Reed–Solomon codes are a group of error-correcting codes that were introduced by Irving S. Reed and Gustave Solomon in 1960.
> They have many applications, the most prominent of which include consumer technologies such as MiniDiscs, CDs, DVDs, Blu-ray discs, QR codes, data transmission technologies such as DSL and WiMAX, broadcast systems such as satellite communications, DVB and ATSC, and storage systems such as RAID 6.
> Reed–Solomon codes operate on a block of data treated as a set of finite-fiel...

---

<div class="post-metadata">

**Author:** ![mabod](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mabod/32/941_2.png) [@mabod](https://kopia.discourse.group/u/mabod)\
**Post date:** [February 5, 2024, 12:47pm UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/6 "2024-02-05T12:47:18Z")

</div>

Thanks for all the info. I have seen that already.

What about my other question: How does kopia tell the user if a repository has ecc enabled?

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [February 5, 2024, 12:49pm UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/7 "2024-02-05T12:49:12Z")

</div>

It is experimental feature so highly likely there are many hard edges.

You would have to check in source code. It is somewhere:)

BTW you can see it in kopia UI

---

<div class="post-metadata">

**Author:** ![mabod](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mabod/32/941_2.png) [@mabod](https://kopia.discourse.group/u/mabod)\
**Post date:** [February 5, 2024, 12:50pm UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/8 "2024-02-05T12:50:01Z")

</div>

What is it in repo status? Please see my first post in this thread.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [February 5, 2024, 12:57pm UTC](https://kopia.discourse.group/t/how-is-error-correction-to-be-used/2641/9 "2024-02-05T12:57:03Z")

</div>

`repository status --json`

has all details, e.g.:

```auto
...
  "contentFormat": {
    "hash": "BLAKE2B-256-128",
    "encryption": "AES256-GCM-HMAC-SHA256",
    "ecc": "REED-SOLOMON-CRC32",
    "eccOverheadPercent": 1,
    "version": 2,
    "maxPackSize": 20971520,
    "indexVersion": 2,
...

```
