holland-backup / holland

Holland Backup Manager
http://hollandbackup.org
Other
152 stars 49 forks source link

Mariabackup 10.4 causing issues #311

Closed acomputerwiz closed 4 years ago

acomputerwiz commented 4 years ago
--- Starting backup run ---
Creating backup path /backups/holland/mariabackup/20200813_101840
* Generating mysql option file: /backups/holland/mariabackup/20200813_101840/my.cnf
  + Added !include /root/.my.cnf
  + Added !include /etc/my.cnf
  + Added [client] section with credentials                             from [mysql:client] section
No backups purged
Estimated Backup Size: 225.18MB
Adjusting estimated size by 0.50 to 112.59MB
Starting backup[mariabackup/20200813_101840] via plugin mariabackup
Executing: /bin/mariabackup --version
/bin/mariabackup based on MariaDB server 10.4.14-MariaDB Linux (x86_64)
Executing: /bin/mariabackup --defaults-file=/backups/holland/mariabackup/20200813_101840/my.cnf --backup --stream=xbstream --tmpdir=/backups/holland/mariabackup/20200813_101840 --no-timestamp --target-dir=/backups/holland/mariabackup/20200813_101840
  > /backups/holland/mariabackup/20200813_101840/backup.mb.gz 2 > /backups/holland/mariabackup/20200813_101840/mariabackup.log
!! mariabackup  exited with failure status [2]
    ! /bin/mariabackup: unknown option '--no-timestamp'
mariabackup  exited with failure status [2]
Backup failed after 0.12 seconds
Purged failed backup: mariabackup/20200813_101840, failed-backup
Backup failed: Failed backup: mariabackup
Released lock /etc/holland/backupsets/mariabackup.conf
--- Ending backup run ---

--no-timestamp is not supported by mariabackup 10.4 How can we remove that command line option, I am not including it anywhere.

mikegriffin commented 4 years ago

It seems mariabackup (and likely xtrabackup) providers unconditionally append --no-timestamp, even if a --stream type is used (the default,) which is almost certainly not needed in those cases:

args.append("--no-timestamp")

I'll try and test out behavior without stream in MariaBackup 10.0+ to see if this is ever useful but for now you could either revert to MariaDB 10.3 (unlikely) or modify holland by placing a comment around the above linked line, eg:

# grep timestamp /usr/lib/python2.6/site-packages/holland/backup/mariabackup/util.py

#args.append("--no-timestamp")

This avoids the Holland bug:

Executing: /usr/bin/mariabackup --version /usr/bin/mariabackup based on MariaDB server 10.4.14-MariaDB Linux (x86_64) Executing: /usr/bin/mariabackup --defaults-file=/var/spool/holland/mariabackup/20200813_170012/my.cnf --backup --stream=xbstream --tmpdir=/var/spool/holland/mariabackup/20200813_170012 --target-dir=/var/spool/holland/mariabackup/20200813_170012

/var/spool/holland/mariabackup/20200813_170012/backup.mb.gz 2 > /var/spool/holland/mariabackup/20200813_170012/mariabackup.log Skipping --prepare since backup is streamed Final on-disk backup size 12.82MB

soulen3 commented 4 years ago

Looks like--no-timestamp doesn't really do anything due to our other options. So I'm going to remove it in the next version of holland.