NetWorker:当“binlog”文件不存在时,MySQL 备份失败
Summary: 当“二进制日志”文件不存在时,使用 NetWorker 数据库和应用程序模块 (NMDA) 的 MySQL 首次备份永远不会完成。
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
当 MySQL 数据库中不存在“二进制日志”文件时,MySQL 第一次备份永远不会结束。
Cause
由于 MySQL“二进制日志”文件不存在,NetWorker 客户端不会继续备份活动。
重要提示:仅当使用等于“5”的“调试级别”执行 NetWorker 备份作业时,才会显示有关此根本原因的证据。
在 NetWorker 客户端中,NetWorker 日志文件(默认位置:/nsr/logs 目录)报告该 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
要解决此问题,请清除所有以前遗漏的“二进制日志”,直至第一个“二进制日志”可用。
重要提示:在以下过程中,第一个可用的“二进制日志”名为“mysql-bin.004585”,但这只是实验环境中的一个示例,用于解释可能的解决方案。
流程
免责声明:在执行此过程之前, Dell Technologies 建议让 MySQL 管理员提前进行验证,然后再根据您的环境应用此方法作为最佳解决方案。
-
以“root”用户身份登录 MySQL 服务器。
-
连接到 MySQL 数据库控制台。
-
通过运行以下命令检查“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 |
-
通过运行以下命令,清除第一个可用“二进制日志”之前所有缺失的“二进制日志”:
提醒:在这种情况下,“mysql-bin.004585”是第一个可用的“二进制日志”。mysql> purge binary logs to 'mysql-bin.004585'; Query OK, 0 rows affected, 4584 warnings (10.12 sec)
-
重新运行备份作业,以验证它是否顺利完成。
- 成功备份作业的证据(如客户端的 NetWorker 日志中所示):
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 ApplicationsArticle 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.