Stay organized with collections
Save and categorize content based on your preferences.
Looker automatically rotates log files daily. However, once the log is rotated and date stamped, Looker does not perform any further actions to compress or delete the logs. To preserve disk space on a customer-hosted Looker instance, we recommend you archive and delete older log files.
For the most basic configuration, we recommend setting up archive jobs in the Looker user's crontab. Add the following cron entries to leave the previous 7 days of log files uncompressed and the 21 days of log files prior to that gzipped in your log directory:
To leave fewer uncompressed logs, change the 7 in the first entry to a lower number. To store fewer compressed logs, change the 28 in the second crontab entry to a lower number.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[],null,["# Archiving Looker log files\n\nLooker automatically rotates [log files](/looker/docs/2512/creating-backups#directory_structure) daily. However, once the log is rotated and date stamped, Looker does not perform any further actions to compress or delete the logs. To preserve disk space on a customer-hosted Looker instance, we recommend you archive and delete older log files.\n\nFor the most basic configuration, we recommend setting up archive jobs in the Looker user's crontab. Add the following `cron` entries to leave the previous 7 days of log files uncompressed and the 21 days of log files prior to that gzipped in your log directory: \n\n ##zip Looker logs\n 9 1 * * * find $HOME/looker/log -name 'looker.log.????????' -mtime +7 -exec gzip '{}' \\; \u003e /dev/null\n ##delete Looker logs\n 33 1 * * * find $HOME/looker/log -name 'looker.log.????????.gz' -mtime +28 -exec rm -f '{}' \\; \u003e /dev/null\n\nTo leave fewer uncompressed logs, change the `7` in the first entry to a lower number. To store fewer compressed logs, change the `28` in the second crontab entry to a lower number.\n\nFor more information on how to use `cron`, see \u003chttps://help.ubuntu.com/community/CronHowto\u003e."]]