Skip to content

Moving LogZilla Archive Files

LogZilla maintains an archive of past events. The size of this archive is controlled by the logzilla config ARCHIVE_FLUSH_DAYS and logzilla config ARCHIVE_EXPIRE_DAYS commands (as indicated here).

The size of the LogZilla archive will depend on those two settings and the rate of events LogZilla is receiving. To see how much space the LogZilla archive is taking you can issue:

du -csh /var/lib/docker/volumes/lz_archive/

If desired, for example due to disk space concerns, the LogZilla archive can be moved to a different drive or directory. The procedure to do so is to issue the following commands (as root user):

logzilla stop
docker run --rm -v /new_archive_dir:/new_archive_dir -v lz_archive:/temp_archive  logzilla/runtime sh -c "mv  /temp_archive/* /new_archive_dir/"
docker rm lz_watcher
docker volume rm lz_archive
docker volume create --opt type=none --opt o=bind --opt device=/new_archive_dir  lz_archive
logzilla start

where old_archive_dir is the current location of the LogZilla archive; for a default LogZilla install this would be /var/lib/docker/volumes/lz_archive. Then new_archive_dir should be replaced with the desired new location (directory) of the LogZilla archive.