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?
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.
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.