# CLI logs and Content log directories

**URL:** <https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296>\
**Category:** Support\
**Created:** [February 26, 2021, 9:59am UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296 "2021-02-26T09:59:25Z")\
**Posts on this page:** 7\
**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:** [February 26, 2021, 9:59am UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296/1 "2021-02-26T09:59:25Z")

</div>

I’m running Kopia to create nightly backups to S3. However, it appears that the `/.cache/kopia/cli-logs` and `/.cache/kopia/content-logs` are becoming quite large in size. I’m guessing it is safe to delete the contents of these directories, but it would be good to get some confirmation. Just want to be sure that this action will have no consequence to using Kopia.

Also there is a directory named a random string which seems to contain metadata, I’m guessing this cannot be deleted at all?

Great work with Kopia by the way!

---

<div class="post-metadata">

**Author:** ![budy](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/budy/32/38_2.png) [@budy](https://kopia.discourse.group/u/budy)\
**Post date:** [February 26, 2021, 2:43pm UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296/2 "2021-02-26T14:43:23Z")

</div>

I excluded the logs from uploading to the kopia repo - usually, you will need them only for troubleshooting. Unless… you’ll have to keep them, for compliance reasons.

---

<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:** [February 26, 2021, 2:54pm UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296/3 "2021-02-26T14:54:28Z")

</div>

Logs are totally safe to delete. There are some hidden settings which may be useful to tweak if logs are bothering you:

- `--log-dir=<path>` or `export KOPIA_LOG_DIR=<path>` - specify log location
- `--log-dir-max-files=N` or `export=KOPIA_LOG_DIR_MAX_FILES=N` - number of log files to keep (default 1000)
- `--log-dir-max-age=AGE` or `export KOPIA_LOG_DIR_MAX_AGE=AGE` (maximum age of logs to keep - default `720h`
- `--content-log-dir-max-files=N` or `export=KOPIA_CONTENT_LOG_DIR_MAX_FILES=N` - number of log files to keep (default=5000)
- `--content-log-dir-max-age=AGE` or `export KOPIA_CONTENT_LOG_DIR_MAX_AGE=AGE` (maximum age of logs to keep - default `720h`

As you can see the defaults are quite high - this is because Kopia is still new and it helps with troubleshooting. Later we’ll adjust the defaults down.

---

<div class="post-metadata">

**Author:** ![Wilton\_Leite](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/wilton_leite/32/359_2.png) [@Wilton\_Leite](https://kopia.discourse.group/u/Wilton_Leite)\
**Post date:** [March 30, 2022, 6:59pm UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296/4 "2022-03-30T18:59:56Z")

</div>

Boa tarde,  
Como eu altero essas variáveis de log?

---

<div class="post-metadata">

**Author:** ![iBackup](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ibackup/32/355_2.png) [@iBackup](https://kopia.discourse.group/u/iBackup)\
**Post date:** [April 1, 2022, 2:54am UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296/5 "2022-04-01T02:54:49Z")

</div>

तपाईंले माथि प्रदान गरिएको पोष्टमा बराबर चिन्हको दायाँ छेउमा, वास्तविक मार्गमा क्यारेक्टरहरू प्रतिस्थापन गर्न आवश्यक छ

---

<div class="post-metadata">

**Author:** ![komio](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@komio](https://kopia.discourse.group/u/komio)\
**Post date:** [June 28, 2025, 3:12pm UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296/6 "2025-06-28T15:12:58Z")

</div>

> [@jkowalski](#):
>
> –log-dir-max-files=N

Hi,

I use KopiaUI with Windows 11. How can I set these log settings?

I have checked “Launch at Startup” in the app, but I don’t know where I could use these log settings. Are they are working in my repository.config?

Thanks!

---

<div class="post-metadata">

**Author:** ![komio](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@komio](https://kopia.discourse.group/u/komio)\
**Post date:** [July 12, 2025, 9:05am UTC](https://kopia.discourse.group/t/cli-logs-and-content-log-directories/296/7 "2025-07-12T09:05:39Z")

</div>

Any hint for setting log file size in KopiaUI with Windows 11?
