Bug #59912 No value for --start-lsn option fails with wrong error message
Submitted: 3 Feb 2011 0:32 Modified: 9 Feb 2011 22:52
Reporter: Hema Sridharan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:3.6 OS:Any
Assigned to: CPU Architecture:Any

[3 Feb 2011 0:32] Hema Sridharan
Description:
When performing incremental backup, do not specify a value for --start-lsn option. 
This will result in an error but wrong message as

Error: Missing or invalid option :
   Missing --incremental-backup-dir option. Specified Operation: backup

How to repeat:
Run incremental mysqlbackup,
--exec $MYSQLBACKUP --port=13000 --protocol=tcp --user=root --incremental --start-lsn --incremental-backup-dir=$BACKUP2 backup > $LOGDIR/backup-inc1.log 2>&1

The above command results in an error as 

Error: Missing or invalid option :
Missing --incremental-backup-dir option. Specified Operation: backup

If you notice it mentions about missing --incremental-backup-dir option which is not the case. Instead the error occurs because of missing --start-lsn option. 

The message needs to be corrected to be more intuitive.

Suggested fix:
The message needs to be corrected to be more intuitive.
[3 Feb 2011 1:17] Hema Sridharan
The wrong error occurs even if no --incremental option is specified when performing incremental backup. The error shows as "Missing backup-dir option instead of missing --incremental command.

The backup log shows following error,
Error: Missing or invalid option :
   Missing --backup-dir option. Specified Operation: backup
[5 Feb 2011 12:17] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior:

$./mysqlbackup  --port=13000 --protocol=tcp --user=root --incremental --start-lsn --incremental-backup-dir=$BACKUP2 backup 

InnoDB Backup Utility v3.6.0 [2011/02/05] 
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All Rights Reserved.

INFO: Starting with following command line ...
 ./mysqlbackup --port=13000 --protocol=tcp --user=root --incremental 
        --start-lsn --incremental-backup-dir= backup 

 mysqlbackup: Error: Invalid lsn number specified. Use --help option for help.
 mysqlbackup: Error: Problem found during option processing.

$./mysqlbackup  --port=13000 --protocol=tcp --user=root --incremental  --incremental-backup-dir=$BACKUP2 backup 

InnoDB Backup Utility v3.6.0 [2011/02/05] 
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All Rights Reserved.

INFO: Starting with following command line ...
 ./mysqlbackup --port=13000 --protocol=tcp --user=root --incremental 
        --incremental-backup-dir= backup 

Error: Missing or invalid option :
   Need --start-lsn for incremental backup. Specified Operation: backup

Use --help option for usage description.

As you see error message is correct. I use revision:

revno: 279
committer: Thava Alagu <thavamuni.alagu@sun.com>
branch nick: single-bin
timestamp: Sat 2011-02-05 01:58:19 +0530
message:
  WL#5497 Support for single backup image.
  
  This patch adds support for backup-dir-to-image command.

Please update your tree if needed and check if problem still exists.
[9 Feb 2011 23:00] Hema Sridharan
This issue is not noticed in the latest tree, so closing the bug.
[9 Feb 2011 23:04] Hema Sridharan
This issue is not noticed in the latest tree, so closing the bug.
[9 Feb 2011 23:06] Hema Sridharan
This issue is not noticed in the latest tree, so closing the bug.