# \--safe-slave-backup with MySQL 8 binlog\_format MIXED

**URL:** <https://forums.percona.com/t/safe-slave-backup-with-mysql-8-binlog-format-mixed/15256>\
**Category:** Percona XtraBackup\
**Created:** [April 15, 2022, 9:50am UTC](https://forums.percona.com/t/safe-slave-backup-with-mysql-8-binlog-format-mixed/15256 "2022-04-15T09:50:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aviddavid](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@aviddavid](https://forums.percona.com/u/aviddavid)\
**Post date:** [April 15, 2022, 9:50am UTC](https://forums.percona.com/t/safe-slave-backup-with-mysql-8-binlog-format-mixed/15256/1 "2022-04-15T09:50:00Z")

</div>

Hi. Is it true that `--safe-slave-backup` is specifically only for temporary tables and so not needed in MySQL 8 when using `binlog_format` of `ROW` or `MIXED`?

I’m backing up a MySQL 8 slave/replica using xtrabackup 8.0.26-18 with `--safe-slave-backup` option. MySQL 8 is configured with `binlog_format` of `MIXED`. I’d prefer not to use `--safe-slave-backup` option because this stops the replication thread for the entire backup. My backup takes more than 1 hour to complete due to the size of the database and so replication falls quite far behind and I’d like to avoid that if possible.

[https://www.percona.com/doc/percona-xtrabackup/LATEST/xtrabackup\_bin/xbk\_option\_reference.html](https://www.percona.com/doc/percona-xtrabackup/LATEST/xtrabackup_bin/xbk_option_reference.html) hints that `--safe-slave-backup` is specifically for temporary tables and so it’s not needed in MySQL 5.7 if `binlog_format` is `ROW`.

In MySQL 8 according to [MySQL :: MySQL 8.0 Reference Manual :: 17.5.1.31 Replication and Temporary Tables](https://dev.mysql.com/doc/refman/8.0/en/replication-features-temptables.html) and [MySQL :: MySQL 8.0 Reference Manual :: 5.4.4.3 Mixed Binary Logging Format](https://dev.mysql.com/doc/refman/8.0/en/binary-log-mixed.html), it seems that `binlog_format` of `ROW` or `MIXED` doesn’t replicate temporary tables and this is why I’m thinking (and hoping) that I don’t need option `--safe-slave-backup`.

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [April 15, 2022, 11:05am UTC](https://forums.percona.com/t/safe-slave-backup-with-mysql-8-binlog-format-mixed/15256/2 "2022-04-15T11:05:50Z")

</div>

Hi @aviddavid , yes you are correct. --safe-slave-backup makes sense only when STATEMENT row replication, it was meant to overcome an issue when the slave thread was in the middle of a temporary table operation at the end of the backup. However, both ROW and MIXED row formats will disable binlog events for temporary tables.

Also remember, always test your backups for the porpouse you have them (replace a master, create a new slave, perform PITR), this is still the best technique to avoid undesired surprises when a restore is needed.

---

<div class="post-metadata">

**Author:** ![aviddavid](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@aviddavid](https://forums.percona.com/u/aviddavid)\
**Post date:** [April 15, 2022, 11:34am UTC](https://forums.percona.com/t/safe-slave-backup-with-mysql-8-binlog-format-mixed/15256/3 "2022-04-15T11:34:44Z")

</div>

Thanks @Marcelo_Altmann - much appreciated.
