NetWorker: O backup do MySQL falha quando o arquivo "binlog" não existe

Summary: Os primeiros backups do MySQL usando o NetWorker Module for Databases and Applications (NMDA) nunca são concluídos quando o arquivo "binlog" não existe.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

O primeiro backup do MySQL nunca termina quando o arquivo "binlog" não existe no banco de dados MySQL.

 

Cause

Como o arquivo "binlog" do MySQL não existe, o client do NetWorker não continua a atividade de backup.

IMPORTANTE: As evidências relativas a essa causa raiz são mostradas somente quando o trabalho de backup do NetWorker é executado com "Nível de depuração" igual a "5".

No client do NetWorker, o arquivo de log do NetWorker (local padrão: /nsr/logs directory) informa que o "binlog" ausente desse banco de dados 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 resolver esse problema, limpe todos os "binlog" perdidos anteriormente até o primeiro "binlog" disponível.

IMPORTANTE: No procedimento a seguir, o primeiro "binlog" disponível é chamado "mysql-bin.004585", mas este é apenas um exemplo de um ambiente de laboratório para explicar uma possível solução.

Procedimento

ISENÇÃO DE RESPONSABILIDADE: Antes de seguir esse procedimento, a Dell Technologies recomenda envolver um administrador do MySQL para validar com antecedência antes de aplicar esse método como a melhor solução possível de acordo com seu ambiente.
  1. Faça login no seu servidor MySQL como usuário "root".

  2. Conecte-se ao console do banco de dados MySQL.

  3. Verifique a disponibilidade atual de "binlog" executando o seguinte comando:

    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 |
  4. Limpe todos os "binlog" perdidos anteriores ao primeiro "binlog" disponível executando o seguinte comando:

    Nota: Nesse caso, "mysql-bin.004585" é o primeiro "binlog" disponível.
    mysql> purge binary logs to 'mysql-bin.004585';
    Query OK, 0 rows affected, 4584 warnings (10.12 sec)
  5. Execute novamente o trabalho de backup para confirmar que ele foi concluído sem erros.

    • Evidência de um trabalho de backup bem-sucedido (conforme mostrado nos registros do NetWorker no lado do client):
    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.

 

Products

NetWorker Module for Databases and Applications
Article Properties
Article Number: 000173788
Article Type: Solution
Last Modified: 06 Mar 2026
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.