MySQL Global Transaction Identifiers and MySQL Backups

When site backups run for GT ID enabled MySQL database servers the following happens in the backup process:

Dumping MySQL database <db name> ..
    .. dump failed! Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that changed suppressed parts of the database. If you don't want to restore GTIDs, pass --set-gtid-purged=OFF. To make a complete dump, pass --all-databases --triggers --routines --events. 

Which triggers a backup failed message.

The fix is to pass the --set-gtid-purgerd=OFF which allows the backup to complete successfully and allows the restore to be replicated across a GT ID enabled MySQL cluster by assigning new GT IDs.

Thanks,

-Alex

Status: 
Closed (fixed)

Comments

Thanks! However, is there any way to detect if MySQL has GT ID enabled? Because it doesn't look like that --set-gtid-purgerd=OFF flag is supported on all versions.

Jamie,

I think the easiest way is to detect the MySQL variable for gtid_mode = ON. This is the setting required to enable GT IDs on MySQL 5.6.

Thanks,

-Alex

Automatically closed -- issue fixed for 2 weeks with no activity.

Jamie,

Thanks for this update. However we have a report from Alex that there is a typo in the code:

       $gtidsql = "--set-gtid-purgerd=OFF";

i.e. the string "purgerd" should instead be "purged".

--mic--

Oops - this will be fixed in the next Webmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.