PDA

View Full Version : Flush of logs failed



dustin
August 13th, 2010, 07:54 AM
My ZRM backups stopped working about a week ago, and I haven't been able to find further information about why. With verbose, this is what I see in the logs:


Fri Aug 13 00:00:01 2010: daily:pre-schedule:WARNING: last backup directory is not valid
Fri Aug 13 00:00:01 2010: daily:schedule:WARNING: last backup directory is not valid
Fri Aug 13 00:00:01 2010: daily:backup:WARNING: last backup directory is not valid
Fri Aug 13 00:00:01 2010: daily:backup:INFO: Mail address: dustin@v.igoro.us is ok
Fri Aug 13 00:00:01 2010: daily:backup:INFO: Using /usr/share/mysql-zrm/plugins/lvm-snapshot.pl as the default plugin since snapshot-plugin has not been specified
Fri Aug 13 00:00:01 2010: daily:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/daily/tmpY2s0f.conf
Fri Aug 13 00:00:01 2010: daily:backup:INFO: {
Fri Aug 13 00:00:01 2010: daily:backup:INFO: quiet=0
Fri Aug 13 00:00:01 2010: daily:backup:INFO: retention-policy=2D
Fri Aug 13 00:00:01 2010: daily:backup:INFO: verbose=1
Fri Aug 13 00:00:01 2010: daily:backup:INFO: backup-level=0
Fri Aug 13 00:00:01 2010: daily:backup:INFO: mailto=dustin@v.igoro.us
Fri Aug 13 00:00:01 2010: daily:backup:INFO: host=mysql.r.igoro.us
Fri Aug 13 00:00:01 2010: daily:backup:INFO: snapshot-plugin=/usr/share/mysql-zrm/plugins/lvm-snapshot.pl
Fri Aug 13 00:00:01 2010: daily:backup:INFO: backup-mode=logical
Fri Aug 13 00:00:01 2010: daily:backup:INFO: password=******
Fri Aug 13 00:00:01 2010: daily:backup:INFO: compress=
Fri Aug 13 00:00:01 2010: daily:backup:INFO: user=backup-user
Fri Aug 13 00:00:01 2010: daily:backup:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/ssh-copy.pl
Fri Aug 13 00:00:01 2010: daily:backup:INFO: }
Fri Aug 13 00:00:01 2010: daily:backup:INFO: Getting mysql variables
Fri Aug 13 00:00:01 2010: daily:backup:INFO: mysqladmin --user="backup-user" --password="*****" --host="mysql.r.igoro.us" variables
Fri Aug 13 00:00:01 2010: daily:backup:INFO: datadir is /var/lib/mysql/
Fri Aug 13 00:00:01 2010: daily:backup:INFO: mysql_version is 5.0.90-log
Fri Aug 13 00:00:01 2010: daily:backup:INFO: log_bin=ON
Fri Aug 13 00:00:01 2010: daily:backup:INFO: InnoDB data file are /var/lib/mysql/ibdata1
Fri Aug 13 00:00:01 2010: daily:backup:INFO: InnoDB log dir is /var/lib/mysql/.
Fri Aug 13 00:00:01 2010: daily:backup:INFO: backup set being used is daily
Fri Aug 13 00:00:01 2010: daily:backup:INFO: backup-set=daily
Fri Aug 13 00:00:01 2010: daily:backup:INFO: backup-date=20100813000001
Fri Aug 13 00:00:01 2010: daily:backup:INFO: host=mysql.r.igoro.us
Fri Aug 13 00:00:01 2010: daily:backup:INFO: backup-date-epoch=1281675601
Fri Aug 13 00:00:01 2010: daily:backup:INFO: retention-policy=2D
Fri Aug 13 00:00:01 2010: daily:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.2.1
Fri Aug 13 00:00:01 2010: daily:backup:INFO: mysql-version=5.0.90-log
Fri Aug 13 00:00:01 2010: daily:backup:INFO: backup-directory=/var/lib/mysql-zrm/daily/20100813000001
Fri Aug 13 00:00:01 2010: daily:backup:INFO: Executing pre-backup-plugin
Fri Aug 13 00:00:01 2010: daily:backup:INFO: Flushing the logs
Fri Aug 13 00:00:01 2010: daily:backup:INFO: flush-logs
Fri Aug 13 04:00:01 2010: purge:INFO: Purging Backup /var/lib/mysql-zrm/daily/20100811000001
Fri Aug 13 08:00:01 2010: daily:backup:ERROR: Flush of logs failed
Fri Aug 13 08:00:01 2010: daily:backup:INFO: backup-status=Backup failed
Fri Aug 13 08:00:01 2010: daily:backup:INFO: Backup failed
Fri Aug 13 08:00:01 2010: daily:backup:INFO: mailing file /tmp/HxDRNIdlcW


I realize that this is just an old version, but nothing newer is available in portage, and I'd like to just figure out what's broken and fix it.

dustin
August 13th, 2010, 08:23 AM
Looking at the code, it seems that this comes from a run of 'mysqladmin flush-logs'

That operation seems to be hanging for me, which makes sense -- there's a 4-hour delay between flushing and seeing the flush fail. So perhaps this is a MySQL problem!

dustin
August 13th, 2010, 08:28 AM
Ah! MySQL's error log file had disappeared (I switched syslog daemons and accidentally deleted its directory), and apparently it tries to rotate error logs on 'flush logs', too, and fails when the directory is gone.