xtrabackup additional-options not passed to prepare
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
holland-backup |
New
|
Undecided
|
Unassigned | ||
1.0 |
Triaged
|
High
|
Andrew Garner | ||
2.0 |
New
|
Undecided
|
Unassigned |
Bug Description
Problem:
additional-options specification in xtrabackup backupset configuration are not passed to the prepare phase when apply-logs=yes and stream=no
How to reproduce:
[root@host ~]# holland mc xtrabackup -f /etc/holland/
Holland 1.0.10 started with pid 29594
Saving config to '/etc/holland/
[root@host ~]# diff -u /etc/holland/
--- /etc/holland/
+++ /etc/holland/
@@ -9,13 +9,13 @@
global-defaults = /etc/my.cnf
innobackupex = innobackupex-1.5.1
# ibbackup = "" # no default
-stream = tar
+stream = no
apply-logs = yes
slave-info = no
safe-slave-backup = no
no-lock = no
# tmpdir = "" # no default
-additional-options = ,
+additional-options = --use-mem=123M
# pre-command = "" # no default
[compression]
[root@host ~]# cat /dev/null > /var/log/
[root@host ~]# holland -q bk xtrabackup
[root@host ~]# echo $?
0
[root@host ~]# grep innobackupex /var/log/
2013-08-24 05:17:16,067 [INFO] Executing: /usr/bin/
2013-08-24 05:17:41,844 [INFO] Executing: /usr/bin/
2013-08-24 05:17:52,532 [INFO] At the end of a successful apply-log run innobackupex-1.5.1
2013-08-24 05:17:52,532 [INFO] 130824 05:17:42 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup_55 --defaults-
2013-08-24 05:17:52,539 [INFO] 130824 05:17:47 innobackupex-1.5.1: Restarting xtrabackup with command: xtrabackup_55 --defaults-
2013-08-24 05:17:52,546 [INFO] 130824 05:17:52 innobackupex-1.5.1: completed OK!
Expected:
2013-08-24 05:17:52,532 [INFO] 130824 05:17:42 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup_55 --defaults-
There definitely should be a way to adjust options to --apply-logs. However, I don't think it makes sense to pass the same "additional- options" unconditionally to both the innobackupex backup and apply-logs phases.
Perhaps we should just have, as a default:
prepare-command = "innobackupex --apply-logs ${target_ directory} "
And that can be customized as needed. This allows adjusting the command to use --apply-logs-only and/or adding any set of other parameters some of which may not be easily anticipated today.