Scheduled S3 backup fails

This is my output;

Creating backup for virtual server xxx.com .. • Copying virtual server configuration .. • .. doneBacking up Cron jobs .. .. none defined. Saving mail aliases .. .. done Saving mail and FTP users .. .. done Backing up mail and FTP user Cron jobs .. .. none to backup Copying Apache virtual host configuration .. .. done Copying Apache log files .. .. done Copying Logrotate configuration .. .. Error: no log rotation configuration found! Dumping MySQL database xxx .. .. done Backing up Webmin ACL files .. .. done Creating TAR file of home directory .. .. done .. completed in 13 seconds

0 servers backed up successfully, 1 had errors. Servers with errors: xxx.com
Backup is complete. Final size was 0 bytes.
Deleting backups from xxx/%y-%m-%d in Amazon S3 bucket xxx older than 90 days …
… no backups to delete were found

So the error is with LogRotate. How can I fix that?

But I also set my backup to continue on error, and it did, but it says the final backup size is 0KB… How is that possible? Why is it failing completely?

Howdy,

It would (in theory) continue onto other domains even if one domain had a problem… but we may still need to sort out why the log rotation for this particular domain had a problem.

What you may want to do is review /etc/logrotate.conf, and look for a section for your domain “xxx.com”. Do you see one in there? Or is it missing altogether?

-Eric

It is missing altogether;

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

no packages own wtmp and btmp – we’ll rotate them here

/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}

/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}

system-specific logs may be also be configured here.

I also forced log rotation, but no errors there:

Forcing the immediate rotation of all log files …
… done.

/etc/logrotate.d is empty too btw.

Oops, actually now I did logrotate command as root and it said the /etc/logrotate.d/domain.conf could not be read. I changed it chmod to 644 and now it processed ok.

Then I tried to backup again, but the same error, “… Error: no log rotation configuration found!”

The file for the domain is at /etc/logrotate.d/domain.conf and contains:

/var/log/virtualmin/*_log { rotate 1 weekly compress postrotate service httpd reload ; sleep 5 endscript sharedscripts }

And this is the full output of the logrotate command:

logrotate -d -f /etc/logrotate.conf

reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file clamav-update
reading config file httpd
reading config file mailman
reading config file mariadb
reading config file named
reading config file ppp
reading config file proftpd
reading config file sa-update
reading config file syslog
reading config file xxx.com.conf
reading config file wpa_supplicant
reading config file yum

Handling 13 logs

rotating pattern: /var/log/freshclam.log forced from command line (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/freshclam.log
log does not need rotating

rotating pattern: /var/log/httpd/*log forced from command line (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/httpd/access_log
log needs rotating
considering log /var/log/httpd/error_log
log needs rotating
considering log /var/log/httpd/ssl_access_log
log does not need rotating
considering log /var/log/httpd/ssl_error_log
log does not need rotating
considering log /var/log/httpd/ssl_request_log
log does not need rotating
rotating log /var/log/httpd/access_log, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/httpd/access_log-20160326 already exists, skipping rotation
rotating log /var/log/httpd/error_log, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/httpd/error_log-20160326 already exists, skipping rotation

rotating pattern: /var/log/mailman/bounce /var/log/mailman/digest /var/log/mailman/error /var/log/mailman/post /var/log/mailman/smtp /var/log/mailman/smtp-failure /var/log/mailman/qrunner /var/log/mailman/locks /var/log/mailman/fromusenet /var/log/mailman/subscribe /var/log/mailman/vette forced from command line (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/mailman/bounce
log /var/log/mailman/bounce does not exist – skipping
considering log /var/log/mailman/digest
log /var/log/mailman/digest does not exist – skipping
considering log /var/log/mailman/error
log needs rotating
considering log /var/log/mailman/post
log needs rotating
considering log /var/log/mailman/smtp
log needs rotating
considering log /var/log/mailman/smtp-failure
log needs rotating
considering log /var/log/mailman/qrunner
log needs rotating
considering log /var/log/mailman/locks
log /var/log/mailman/locks does not exist – skipping
considering log /var/log/mailman/fromusenet
log /var/log/mailman/fromusenet does not exist – skipping
considering log /var/log/mailman/subscribe
log /var/log/mailman/subscribe does not exist – skipping
considering log /var/log/mailman/vette
log /var/log/mailman/vette does not exist – skipping
rotating log /var/log/mailman/error, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/mailman/error-20160326 already exists, skipping rotation
rotating log /var/log/mailman/post, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/mailman/post-20160326 already exists, skipping rotation
rotating log /var/log/mailman/smtp, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/mailman/smtp-20160326 already exists, skipping rotation
rotating log /var/log/mailman/smtp-failure, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/mailman/smtp-failure-20160326 already exists, skipping rotation
rotating log /var/log/mailman/qrunner, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/mailman/qrunner-20160326 already exists, skipping rotation

rotating pattern: /var/named/data/named.run forced from command line (4 rotations)
empty log files are rotated, old logs are removed
switching euid to 25 and egid to 25
considering log /var/named/data/named.run
log needs rotating
rotating log /var/named/data/named.run, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/named/data/named.run-20160326 already exists, skipping rotation
switching euid to 0 and egid to 0

rotating pattern: /var/log/ppp/connect-errors forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/ppp/connect-errors
log /var/log/ppp/connect-errors does not exist – skipping

rotating pattern: /var/log/proftpd/*.log /var/log/xferlog forced from command line (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/proftpd/controls.log
log does not need rotating
considering log /var/log/xferlog
log /var/log/xferlog does not exist – skipping
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/sa-update.log forced from command line (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/sa-update.log
log does not need rotating

rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
forced from command line (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/cron
log needs rotating
considering log /var/log/maillog
log needs rotating
considering log /var/log/messages
log needs rotating
considering log /var/log/secure
log needs rotating
considering log /var/log/spooler
log needs rotating
rotating log /var/log/cron, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/cron-20160326 already exists, skipping rotation
rotating log /var/log/maillog, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/maillog-20160326 already exists, skipping rotation
rotating log /var/log/messages, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/messages-20160326 already exists, skipping rotation
rotating log /var/log/secure, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/secure-20160326 already exists, skipping rotation
rotating log /var/log/spooler, log->rotateCount is 4
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/spooler-20160326 already exists, skipping rotation

rotating pattern: /var/log/virtualmin/_log forced from command line (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/virtualmin/x.x.x.x_access_log
log needs rotating
considering log /var/log/virtualmin/x.x.x.x_error_log
log needs rotating
considering log /var/log/virtualmin/xxx.com_access_log
log needs rotating
considering log /var/log/virtualmin/xxx.com_error_log
log needs rotating
rotating log /var/log/virtualmin/x.x.x.x_access_log, log->rotateCount is 1
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
rotating log /var/log/virtualmin/x.x.x.x_error_log, log->rotateCount is 1
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
rotating log /var/log/virtualmin/xxx.com_access_log, log->rotateCount is 1
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
rotating log /var/log/virtualmin/xxx.com_error_log, log->rotateCount is 1
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
renaming /var/log/virtualmin/x.x.x.x_access_log to /var/log/virtualmin/x.x.x.x_access_log-20160326
creating new /var/log/virtualmin/x.x.x.x_access_log mode = 0660 uid = 502 gid = 48
renaming /var/log/virtualmin/x.x.x.x_error_log to /var/log/virtualmin/x.x.x.x_error_log-20160326
creating new /var/log/virtualmin/x.x.x.x_error_log mode = 0660 uid = 502 gid = 48
renaming /var/log/virtualmin/xxx.com_access_log to /var/log/virtualmin/xxx.com_access_log-20160326
creating new /var/log/virtualmin/xxx.com_access_log mode = 0660 uid = 501 gid = 48
renaming /var/log/virtualmin/xxx.com_error_log to /var/log/virtualmin/xxx.com_error_log-20160326
creating new /var/log/virtualmin/xxx.com_error_log mode = 0660 uid = 501 gid = 48
running postrotate script
running script with arg /var/log/virtualmin/
_log : "
service httpd reload ; sleep 5
"
compressing log with: /bin/gzip
removing old log /var/log/virtualmin/x.x.x.x_access_log-20160125.gz
compressing log with: /bin/gzip
removing old log /var/log/virtualmin/x.x.x.x_error_log-20160125.gz
compressing log with: /bin/gzip
removing old log /var/log/virtualmin/xxx.com_access_log-20160125.gz
compressing log with: /bin/gzip
removing old log /var/log/virtualmin/xxx.com_error_log-20160125.gz

rotating pattern: /var/log/wpa_supplicant.log forced from command line (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/wpa_supplicant.log
log /var/log/wpa_supplicant.log does not exist – skipping

rotating pattern: /var/log/yum.log forced from command line (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/yum.log
log does not need rotating

rotating pattern: /var/log/wtmp forced from command line (1 rotations)
empty log files are rotated, only log files >= 1048576 bytes are rotated, old logs are removed
considering log /var/log/wtmp
log needs rotating
rotating log /var/log/wtmp, log->rotateCount is 1
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/wtmp-20160326 already exists, skipping rotation

rotating pattern: /var/log/btmp forced from command line (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/btmp
log needs rotating
rotating log /var/log/btmp, log->rotateCount is 1
dateext suffix ‘-20160326’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
destination /var/log/btmp-20160326 already exists, skipping rotation

any ideas anyone?