Logrotate Management - AFS

AFS Installation and Administration Guide

Reference Guide

When a PaF is started, the last execution logs are stored in the following directory: $AFS7/logs/archive.1. If a directory with the same name already exists, logs are stored in "$AFS7/logs/archive.2", and so on. This is the principle of logrotate.

By default, the three last execution logs are stored: $AFS7/logs/archive.1$AFS7/logs/archive.2 and $AFS7/logs/archive.3.

To manage the logrotate, use the -h (history) parameter of the afs_paf command.


  • To store the logs of the last ten PaF executions, run the following command:

    /usr/local/afs7/bin/afs_paf -h 10 -p ...

  • To store no log, run the following command:

    /usr/local/afs7/bin/afs_paf -h 0 -p ...

List of logrotated directories

Only the following log directories are logrotated:

  • Antidot daemons: /usr/local/afs7/logs/daemon (the logrotate configuration is in the antidot-daemon package).
  • Front-end web servers: /var/log/apache2 or /var/log/lighttpd

The logrotate configurations are located in the following directory:


The following script is available to clean logs for non logrotated directories:


The directories cleaned by the script are:

  • /usr/local/afs7/PaFManager/logs
  • /usr/local/afs7/logs/agents

By default, the clean_logs.sh script deletes all logs older than 15 days and does not manage history.

This script is available in the antidot-logmanager package.