[MDEV-28758] Mariabackup copies binary logs to backup directory Created: 2022-06-07 Updated: 2023-11-22 Resolved: 2022-08-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera SST, mariabackup |
| Affects Version/s: | 10.3.35, 10.4.25, 10.5.16, 10.6.8 |
| Fix Version/s: | 10.3.36, 10.4.26, 10.5.17, 10.6.9, 10.7.5, 10.8.4, 10.9.2, 10.10.0 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Michaël de groot | Assignee: | Julius Goryavsky |
| Resolution: | Fixed | Votes: | 13 |
| Labels: | None | ||
| Environment: |
RHEL |
||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Description |
|
Hi, I have log_bin specified to the data directory: In the mariabackup output, I see that mariabackup copies the binary logs to the backup directory: This is needless consumption of space on the backup disk. I did not find a command-line switch to disable copying the binary logs, I think this is a bug in mariabackup to just copy all the files that are in the data directory. Specifying a custom binlog directory is NOT a work-around for this issue. It does not seam that the general log is stored with the backup, so why can the binary logs not be excepted? Earlier bakup runs (with a different mariabackup version) did not show this issue, it seams some thing changed in mariabackup. My current version: The older runs were slightly different versions: Thank you, |
| Comments |
| Comment by Daniel Black [ 2022-06-07 ] | |
|
Is this not covered with --binlog-info=off? | |
| Comment by Michaël de groot [ 2022-06-07 ] | |
|
According to the documentation, this is to retrieve the binary log file and position. Not the binary logs itself. | |
| Comment by Michaël de groot [ 2022-06-07 ] | |
|
The same thing happens from the mariabackup SST script. I have therefore increased the priority. | |
| Comment by Ere Maijala [ 2022-06-15 ] | |
|
I believe this is the reason we are now experiencing downtime due to the read lock being held while the large binary logs are being copied. With previous mariabackup versions the read lock was held for a few seconds, but now it's 44 minutes. | |
| Comment by Martin Reinhardt [ 2022-06-15 ] | |
|
We found a working workaround for a customer with the same issue. We replaced the mariabackup binary containing the bug (version 10.3.35), with the last previously working binary (version 10.3.34). 1) backup the old binary: sudo cp /usr/bin/mariabackup /usr/bin/mariabackup_35 | |
| Comment by Phil Sumner [ 2022-06-16 ] | |
|
I'm experiencing what I suspect is the same issue in 10.6.8 I recently upgraded a replica used exclusively for taking backups from 10.1.48 -> 10.6.8, and using mostly the same command line for mariabackup instead of innobackupex - backup times have at least doubled and backup sizes have gone from 25-30GB to 120GB, and replication comes to a grinding halt while the BACKUP LOCK is taken and held while 2 days of binary logs are also backed up. Old: New: I reverted Maria Backup to 10.6.7 and the behaviour is now as expected - i.e. binlogs are NOT copied. Backup is still slower and larger than in 10.1 with Xtrabackup but it's better than it was. | |
| Comment by Anton Petin [ 2022-06-16 ] | |
|
Same bug in mariabackup 10.5.16, there is no such problem in 10.5.15 with same cmd
| |
| Comment by Stefan May [ 2022-06-17 ] | |
|
I'm also seeing the issue in version 10.5.16 on openSuse Leap 15.3 x86_64 Im my configuration, all binlog files are stored in the main database directory /var/lib/mysql/ In my particular server configuration with automated backups stored on a remote host, these bloated backups impact server performance and waste resources (network traffic and backup space). | |
| Comment by Michaël de groot [ 2022-06-20 ] | |
|
I have tried to implement the work-around of binary logs in a separate directory. This unfortunately did not make a difference. The binary logs are still copied from the custom binlog directory in the backup location. | |
| Comment by Anton Petin [ 2022-06-20 ] | |
|
This is a very serious bug, cause we store bin logs and snapshots of data for a long time. Each snapshot is around 1Tb and binlogs for 1Tb at all, so when we take an snapshot with new version of mariabackup - full backup is around 2Tb and long lock time while backuping. Now we are using mariabackup 10.5.15 on 10.5.16 server, but i think it's not normal for such company like MariaDB not to solve it. | |
| Comment by Andreas Hering [ 2022-07-27 ] | |
|
After an Update we also ran into this Bug. Please fix this or give us a hint how to prevent the creation of binlog archives in backup dir.
| |
| Comment by Sergei Golubchik [ 2022-07-31 ] | |
|
be286c57a looks ok to me | |
| Comment by Jan Lindström (Inactive) [ 2022-08-01 ] | |
|
ok to push | |
| Comment by Julius Goryavsky [ 2022-08-01 ] | |
|
https://github.com/MariaDB/server/commit/7fb1f919d0629d0c2bc68c616de557b658068fa0 |