Hi,
I am having strange problem that is happening sometimes during my nightly backups. Backup does not complete OK and have the error in the end:
xtrabackup: error: last checkpoint LSN (109863974838) is larger than last copied LSN (109863967574).
Here is my “setup”
db-4 is read only slave server running running MySQL 5.7.
db-restore is the server which runs nightly cronjob script using xtrabackup (percona-xtrabackup-24-2.4.24-1.el8.x86_64) to copy the databases from db-4 to db-restore. datadir from db-4 is shared via nfs (ro,no_root_squash) and mounted on db-restore.
Both servers are in same network, OS is Oracle Linux 8.5. On db-4 I have three mysql instances. Each of them is copied (one after another) during the night to db-restore. Only one of the instances is failing. And the strange thing is that the smallest and mostly inactive instance is failing.
During the day, if I run the same backup on the same instance manually it completes successfully.
Below is the log with removed most of the bulk repeating rows and tables. (Sorry, I am new user and have no permissions to attach yet).
xtrabackup: recognized server arguments: --datadir=/srv/config/nfsmount --parallel=6
xtrabackup: recognized client arguments: --password=* --backup=1 --host=192.168.111.41 --port=3316 --user=backup --target-dir=/srv/config/backup --safe-slave-backup=1 --slave-info=1
220218 00:45:02 version_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql_read_default_group=xtrabackup;host=192.168.111.41;port=3316’ as ‘backup’ (using password: YES).
220218 00:45:02 version_check Connected to MySQL server
220218 00:45:02 version_check Executing a version check against the server…
220218 00:45:02 version_check Done.
220218 00:45:02 Connecting to MySQL server host: 192.168.111.41, user: backup, password: set, port: 3316, socket: not set
Using server version 5.7.37-log
Warning: MySQL variable ‘datadir’ points to nonexistent directory ‘/srv/cpanel/data/’
Warning: option ‘datadir’ has different values:
‘/srv/config/nfsmount’ in defaults file
‘/srv/cpanel/data/’ in SHOW VARIABLES
/usr/bin/xtrabackup version 2.4.24 based on MySQL server 5.7.35 Linux (x86_64) (revision id: b4ee263)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /srv/config/nfsmount
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 50331648
InnoDB: Number of pools: 1
220218 00:45:02 >> log scanned up to (109863683631)
InnoDB: Opened 2 undo tablespaces
InnoDB: 0 undo tablespaces made active
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 34 for mysql/servers, old maximum was 2
xtrabackup: Starting 6 threads for parallel data files transfer
220218 00:45:02 [04] Copying ./mysql/servers.ibd to /srv/config/backup/mysql/servers.ibd
220218 00:45:02 [05] Copying ./mysql/plugin.ibd to /srv/config/backup/mysql/plugin.ibd
220218 00:45:02 [01] Copying ./ibdata1 to /srv/config/backup/ibdata1
…
220218 00:47:43 >> log scanned up to (109863967574)
220218 00:47:44 >> log scanned up to (109863967574)
220218 00:47:44 Slave open temp tables: 0
220218 00:47:44 Slave is safe to backup.
220218 00:47:44 Executing FLUSH NO_WRITE_TO_BINLOG TABLES…
220218 00:47:44 Executing FLUSH TABLES WITH READ LOCK…
220218 00:47:44 Starting to backup non-InnoDB tables and files
220218 00:47:44 [01] Copying ./mysql/db.opt to /srv/config/backup/mysql/db.opt
220218 00:47:44 [01] …done
…
220218 00:47:45 [01] …done
220218 00:47:45 Finished backing up non-InnoDB tables and files
220218 00:47:45 [00] Writing /srv/config/backup/xtrabackup_slave_info
220218 00:47:45 [00] …done
220218 00:47:45 [00] Writing /srv/config/backup/xtrabackup_binlog_info
220218 00:47:45 [00] …done
220218 00:47:45 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS…
xtrabackup: The latest check point (for incremental): ‘109863974838’
xtrabackup: Stopping log copying thread.
.220218 00:47:45 >> log scanned up to (109863967574)
220218 00:47:45 Executing UNLOCK TABLES
220218 00:47:45 All tables unlocked
Starting slave SQL thread
220218 00:47:45 Backup created in directory ‘/srv/config/backup/’
MySQL binlog position: filename ‘ulo-db4-cpanel-bin.000111’, position ‘375017735’, GTID of the last change ‘1b39f160-b43d-3316-1dc1-0050569ccaa1:1-57363962,
1b4a83f7-0000-3316-2dc1-0050569ccaa1:1-5000840,
1b4a83f7-b43d-3316-2dc1-0050569ccaa1:1-123972,
1b75d65b-0000-3316-5dc1-0050569ccaa1:1-2,
1b8220fc-0000-3316-1dc2-0050569ccaa1:1-2745845,
1b8220fc-b43d-3316-1dc2-0050569ccaa1:1-380600,
1b8ec709-0000-3316-2dc2-0050569ccaa1:1-131440,
1b8ec709-b43d-3316-2dc2-0050569ccaa1:1-102,
ff9c1e99-0000-3316-2dc1-22c50dd5f44b:1-518708’
MySQL slave binlog position: master host ‘192.168.111.21’, purge list ‘1b39f160-b43d-3316-1dc1-0050569ccaa1:1-57363962, 1b4a83f7-0000-3316-2dc1-0050569ccaa1:1-5000840, 1b4a83f7-b43d-3316-2dc1-0050569ccaa1:1-123972, 1b75d65b-0000-3316-5dc1-0050569ccaa1:1-2, 1b8220fc-0000-3316-1dc2-0050569ccaa1:1-2745845, 1b8220fc-b43d-3316-1dc2-0050569ccaa1:1-380600, 1b8ec709-0000-3316-2dc2-0050569ccaa1:1-131440, 1b8ec709-b43d-3316-2dc2-0050569ccaa1:1-102, ff9c1e99-0000-3316-2dc1-22c50dd5f44b:1-518708’, channel name: ‘u2’
220218 00:47:45 [00] Writing /srv/config/backup/backup-my.cnf
220218 00:47:45 [00] …done
220218 00:47:45 [00] Writing /srv/config/backup/xtrabackup_info
220218 00:47:45 [00] …done
xtrabackup: Transaction log of lsn (109863677198) to (109863967574) was copied.
xtrabackup: error: last checkpoint LSN (109863974838) is larger than last copied LSN (109863967574).