NetWorker: El respaldo de MySQL falla cuando el archivo "binlog" no existe
Summary: Los primeros respaldos de MySQL mediante el módulo de NetWorker para bases de datos y aplicaciones (NMDA) nunca se completan cuando el archivo "binlog" no existe.
Symptoms
El primer respaldo de MySQL nunca finaliza si el archivo "binlog" no existe en la base de datos de MySQL.
Cause
Dado que el archivo "binlog" de MySQL no existe, el cliente de NetWorker no continúa con la actividad de respaldo.
En el cliente de NetWorker, el archivo de registro de NetWorker (ubicación predeterminada: /nsr/logs) informa que falta "binlog" de esa base de datos MySQL:
mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000331' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000332' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000333' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000334' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000335' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000336' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000337' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000338' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000339' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000340' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.000341' does not exist. It could have been purged. PITR will not be possible from this backup. ... mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.004583' does not exist. It could have been purged. PITR will not be possible from this backup. mysqlbackup: WARNING: binlog file '/data/mysql/mysql-bin.004584' does not exist. It could have been purged. PITR will not be possible from this backup. 200901 14:37:32 mysqlbackup: INFO: Copying /data/mysql/mysql-bin.004585. <-- Activity log stuck in this step and backup does not send any new data.The backup job must be canceled manually or wait to timeout (in this case it was after 8 hours running). mysqlbackup: Progress in MB: 383400 mysqlbackup: ERROR: Signal 15 received.
Resolution
Para solucionar este problema, elimine todos los "binlog" perdidos anteriores hasta el primer "binlog" disponible.
Procedimiento
-
Inicie sesión en su servidor MySQL como usuario "root".
-
Conéctese a la consola de base de datos MySQL.
-
Ejecute el siguiente comando para comprobar la disponibilidad actual de "binlog":
mysql> show master logs; <-- Name of the DB that contains the information from the logs missed. | mysql-bin.004580 | 0 | | mysql-bin.004581 | 0 | | mysql-bin.004582 | 0 | | mysql-bin.004583 | 0 | | mysql-bin.004584 | 0 | <-- Last missed log. | mysql-bin.004585 | 1064394753 |
-
Purgue todos los "binlog" perdidos antes del primer "binlog" disponible mediante la ejecución del siguiente comando:
Nota: En este caso, "mysql-bin.004585" es el primer "binlog" disponible.mysql> purge binary logs to 'mysql-bin.004585'; Query OK, 0 rows affected, 4584 warnings (10.12 sec)
-
Vuelva a ejecutar el trabajo de respaldo para validar que se complete sin errores.
- Evidencia de un trabajo de respaldo correcto (como se muestra en los registros de NetWorker desde el lado del cliente):
200903 09:38:14 mysqlbackup: INFO: Backup image created successfully. mysqlbackup: INFO: Image Path = sbt:MYSQL:/MySQLTest 200903 09:38:14 mysqlbackup: INFO: MySQL binlog position: filename mysql-bin.004957, position 154 ------------------------------------------------------------- Parameters Summary ------------------------------------------------------------- Start LSN : 15597868102656 End LSN : 15597868102712 ------------------------------------------------------------- mysqlbackup completed OK! with 2 warnings.