xtrabackup arguments are not validated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Medium
|
Unassigned | ||
2.0 |
Won't Fix
|
Medium
|
Unassigned | ||
2.1 |
Triaged
|
Medium
|
Unassigned | ||
2.2 |
Triaged
|
Medium
|
Unassigned | ||
2.3 |
Triaged
|
Medium
|
Unassigned |
Bug Description
Have a look at the arguments I used. A typo in the arguments can cause wrong things to happen (--incremental-dir in this case)
root@lesktop:
xtrabackup Ver 1.4 Rev 193 for 5.1.47 unknown-linux-gnu (x86_64)
xtrabackup: cd to /data/backups/
xtrabackup: This target seems to be already prepared.
xtrabackup: notice: xtrabackup_logfile was already used to '--prepare'.
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110211 17:25:22 InnoDB: highest supported file format is Barracuda.
[notice (again)]
If you use binary log and don't use any hack of group commit,
the binary log position seems to be:
InnoDB: Last MySQL binlog file position 0 61013, file name /var/log/
xtrabackup: starting shutdown with innodb_
110211 17:25:22 InnoDB: Starting shutdown...
110211 17:25:22 InnoDB: Shutdown completed; log sequence number 4960382476
Expected behavior: bail out when invalid arguments are added.
Changed in percona-xtrabackup: | |
assignee: | nobody → Valentine Gostev (core-longbow) |
Changed in percona-xtrabackup: | |
status: | New → Confirmed |
assignee: | Valentine Gostev (core-longbow) → Alexey Kopytov (akopytov) |
importance: | Undecided → High |
I hit this bug too, but then realized it is an intended behavior. Since xtrabackup reads some of its options from my.cnf, it has to ignore all options it doesn't know.
On the other hand, silently ignoring typos in command line options is definitely not a good idea for a backup utility. I am not sure how this can be resolved. One idea is to parse my.cnf with a custom parser rather than my_getopt.