Backup fails: No logrotate configuration found

2 posts / 0 new
Last post
#1 Fri, 05/18/2018 - 18:02
robbrandt

Backup fails: No logrotate configuration found

I have a backup that fails when it tries to do a backup of all features. I've tried to fix this previously with no luck. The error message is:

Failed to associate features : Validation failed for Log file rotation : No logrotate configuration found for file /var/log/virtualmin/thisdomain_access_log

I have found numerous issues relating to this message, but none of the solutions posted have worked on this one. Specifically...

  • /etc/logrotate.d contains a file for thisdomain.org.conf. It's contents are /var/log/virtualmin/thisdomain.org_access_log /var/log/thisdomain.org_error_log { rotate 5 weekly compress postrotate /usr/sbin/apache2ctl graceful ; sleep 5 endscript sharedscripts }

  • /etc/logrotate.conf does include /etc/logrotate.d

  • I tried copying the contents of the logrotate.d file into an entry in /etc/logrotate.conf, but it didn't help.

  • I tried disabling log rotation globally in Virtualmin, then re-enabling it, and nothing changed.

  • In webmin, I looked under System: Log File Rotation and there is an entry for: /var/log/virtualmin/thisdomain.org_access_log /var/log/virtualmin/thisdomain.org_error_log

  • Back in Virtualmin, I tried Disassociate Features for this domain. I disassociated log file rotation, and then when I associated it again I opted to Validate before saving, and I got this error message: Failed to associate features : Validation failed for Log file rotation : No logrotate configuration found for file /var/log/virtualmin/evolutionsociety_access_log

Any ideas?

Fri, 05/18/2018 - 18:22
robbrandt

I found the problem! Somehow the log files were listed as /var/log/virtualmin/thisdomain_access_log and /var/log/virtualmin/thisdomain_error_log, missing the ".org" part. They should be /var/log/virtualmin/thisdomain.org_access_log and /var/log/virtualmin/thisdomain.org_error_log.

I changed the log file names and it all works now.

Not sure how it got that way, I would have no reason to change that. Possibly when I first created the account I forgot to include the .org in the domain name, and when I updated it it didn't update the log file names. Even so, I would think the backup procedure would look for config files based on whatever the log files are named, but it doesn't.

Either way, changing the log file names seems to break backups.

Topic locked