• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Where are my old access_log files (after log rotation)? (Plesk 11.5)

King555

Regular Pleskian
In Plesk 11.5 I set log rotation to once a day and to keep 365 files. But I can only find 13 files (only one access_log) in /var/www/vhosts/mydomain/log. But Plesk tells me that 100 GB are used for the logs (the 13 files only have about 3 GB). Where are the files? In previous versions (before 11.5) I always had the files (named .1, .2 etc) in the same log directory.
 
Try to recalculate statistics for this domain with

# /usr/local/psa/admin/bin/statistics --calculate-one --domain-name domain.com

Logrotation is executed by the daily maintenance task: /etc/cron.daily/50plesk-daily and has configuration in /usr/local/psa/etc/logrotate.conf and /usr/local/psa/etc/logrotate.d/*
All domain logs are located in /var/www/vhosts/<domain>/logs
No any other places.
 
First of all, I found out why Plesk says I have 100 GB of logfiles. There are exactly two access-log files, "access_log" and "access_log.processed". These files are not compressed and so they have this 100 GB size.

I again checked the settings in Plesk and saved them again (daily log rotation and to keep 365 files) to make sure the settings are really activated. But this did not help.

I looked in the correct directory, but there are no old logs, only two from the current day.

Regarding your answers:
What does recalculating the statistics do? Does it really only calculate the statistics, which I can view graphically? I ask because I don't know how this would help to solve my log problem. The stats in Webalizer are fine.

The file "50plesk-daily" has this content:
# install_statistics
/opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1

# install_mysqldump
/opt/psa/bin/mysqldump.sh >/dev/null 2>&1
How can I check whether this runs correctly?

The only entry in "/usr/local/psa/etc/logrotate.conf", which looks like the setting for the access_log, is this:
/opt/psa/admin/logs/*_log.processed {
weekly
rotate 12
missingok
notifempty
copytruncate
compress
}

"/usr/local/psa/etc/logrotate.d/" contains all my websites as single files and they all say something like this:

/var/www/vhosts/system/mydomain/logs/*.processed {
daily
rotate 365
compress
missingok
}
/var/www/vhosts/system/mydomain/logs/error_log {
daily
rotate 365
compress
missingok
copytruncate
}

Am I doing something wrong?
 
Back
Top