MIssing logrotate files after server migration

Hi. Earlier this we we migrated several dozen sites to a new server - Virtualmin on both - and have just discovered that each site’s logrotate conf file did not get included in the migration. We were almost out of disk space. That crisis was averted by forcing logrotate to run.

But we still need proper logrotate conf files for each site. Is there something we can do on each site to get Virtualmin to create new ones?

Anyone?

Sounds bug-like, though not something we’ve seen. If it’s reproducible, file a ticket in the issue tracker and we’ll look into getting it fixed, but I know logrotate config is normally included in backups, and it’ll complain if they aren’t there, so it might be something about the systems you moved from and to (are they running the same distribution and version or different? we’d need to know the specifics to try to reproduce it).

To regenerate the logrotate config you can use the virtualmin CLI to disable/re-enable the feature. I think this would do it:

# virtualmin disable-feature --all-domains --logrotate # virtualmin enable-feature --all-domains --logrotate

I, too, found that Virtualmin did not create logrotate.d entries and I had to create them by hand.

CORRECTION: Some of the config entries existed in /etc/logrotate.d but some under one domain name, most under another. I removed the stragglers and created an “/etc/logrotate.d/virtualmin” file with all the needed entries.

I don’t know if logrotate files will be created for future domains or not.

Thanks Joe & Jim. It would be a great deal of trouble to try and reproduce it, the server migration happened around a year ago and I no longer have an image of the original server. So even if I spent a week on it I am not sure it would be a valid reproduction. I can tell you that the version of Virtualmin on the old server was itself quite old… although I think I upgraded it before the migration so that the source and target would be running the same versions.

I will try the CLI and report back.

Joe, where in the virtualmin/webmin configuration does it track the “name of the logrotate.d files” ??? In case I want to edit that… thx!