NetWorker: MySQL-sikkerhetskopiering mislykkes når "binlog" -filen ikke eksisterer
Summary: De første MySQL-sikkerhetskopiene som bruker NetWorker Module for Databases and Applications (NMDA), fullføres aldri når binlog-filen ikke finnes.
Symptoms
MySQL første sikkerhetskopi slutter aldri når "binlog" -filen ikke eksisterer i MySQL-databasen.
Cause
Siden MySQL "binlog"-filen ikke finnes, fortsetter ikke NetWorker-klienten sikkerhetskopieringsaktiviteten.
Fra NetWorker-klienten brukes NetWorker-loggfilen (standardplassering: /nsr/logs directory) rapporterer manglende "binlog" av den MySQL-databasen:
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
Du kan løse dette problemet ved å fjerne all tidligere tapte "binlog" til første "binlog" som er tilgjengelig.
Fremgangsmåte
-
Logg inn på MySQL-serveren din som "root" -bruker.
-
Koble til MySQL-databasekonsollen.
-
Sjekk tilgjengeligheten til "binlog" ved å kjøre følgende kommando:
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 |
-
Tøm alle tapte "binlog", før den første "binlog" som er tilgjengelig, ved å kjøre følgende kommando:
Merk: I dette tilfellet er "mysql-bin.004585" den første "binlog" som er tilgjengelig.mysql> purge binary logs to 'mysql-bin.004585'; Query OK, 0 rows affected, 4584 warnings (10.12 sec)
-
Kjør sikkerhetskopieringsjobben på nytt for å bekrefte at den fullføres uten feil.
- Bevis på en vellykket sikkerhetskopieringsjobb (som vist i NetWorker-loggene fra klientsiden):
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.