<@U04SE163WC8> how to set retention on MinIO ?
# ask-ai
d
@kapa.ai how to set retention on MinIO ?
u
Based on the provided knowledge sources, there isn't a direct way to set retention on MinIO through Airbyte. However, there are a few ways to manage the storage used by MinIO: 1. Manual Cleanup: You can manually delete files from MinIO. If you're running on Kubernetes, you can use
kubectl exec
to access the MinIO pod and delete files and folders inside
/storage/airbyte-dev-logs/job-logging/workspace/
([source](https://discuss.airbyte.io/t/3101)). 2. Increase Storage Space: If MinIO is running out of space, you can increase the storage allocated to it. For example, you can increase the space for MinIO in the path
/storage
([source](https://discuss.airbyte.io/t/1078)). 3. External Log Storage: For self-managed enterprise deployments, Airbyte recommends using standalone log storage such as S3, GCS, or Azure for additional reliability. This can help manage the storage used by MinIO ([source](https://docs.airbyte.com/enterprise-setup/implementation-guide#configuring-external-logging)). 4. Job History Retention: There's a
TEMPORAL_HISTORY_RETENTION_IN_DAYS
environment variable that can be set to auto delete job history logs after a certain number of days. However, this seems to be related to Temporal and not directly to MinIO ([source](https://github.com/airbytehq/airbyte/issues/39358)). Please note that these are workarounds and not a direct way to set retention on MinIO. For more specific functionality, you might need to look into MinIO's own documentation or consider using an external log storage solution.
d
@kapa.ai i want to keep only last 7 days of logs
u
A message from kapa.ai
u
To keep only the last 7 days of logs in Airbyte, you can set the
TEMPORAL_HISTORY_RETENTION_IN_DAYS
environment variable to
7
. This variable defines the retention period of the job history in Temporal and the same value is applied to the log retention when running in Docker ([source](https://docs.airbyte.com/operator-guides/configuring-airbyte#data-retention)). If you're deploying Airbyte using Helm charts in a Kubernetes environment, you can set this environment variable using the
--set
flag in your Helm command. Here's an example:
Copy code
bash helm install -n foresight-infra airbyte airbyte/airbyte --set global.env_vars.TEMPORAL_HISTORY_RETENTION_IN_DAYS="7"
([source](https://github.com/airbytehq/airbyte/issues/39358)) Please note that this will clean up the job history logs in Temporal, but it may not directly affect other logs such as those in MinIO or the
db-airbyte
database. For those, you might need to implement additional cleanup strategies.