Bug #60100 Backup history logs should have comments & comments_file optios for mysqlbackup
Submitted: 10 Feb 2011 17:42 Modified: 15 Feb 2011 13:19
Reporter: Hema Sridharan Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:MEB 3.6 OS:Any
Assigned to: CPU Architecture:Any

[10 Feb 2011 17:42] Hema Sridharan
Execute mysqlbackup with --comments and --comments-file option.
Once backup gets completed, we cannot identify these rows in backup logs. 
It will be good to add these options also in the history logs along with other information about backup.

How to repeat:
Run backup with --comments and --comments-file option.
Check the mysql.backup_history logs.

SELECT * FROM mysql.backup_history;;
backup_id       BACKUP_ID
tool_name       MYSQLBACKUP --port=[#####] --protocol=tcp --user=root --backup-image=MYSQLTEST_VARDIR/tmp/backupabs.mbi --backup-dir=MYSQLTEST_VARDIR/tmp/mysqlbackup backup-to-image
start_time      START_TIME
end_time        STOP_TIME
binlog_pos      BINPOS
binlog_file     BINLOG-DISABLED
compression_level       0
innodb_data_file_path   ibdata1:10M;ibdata2:10M:autoextend
innodb_file_format      Antelope
start_lsn       SLSN
end_lsn ELSN
incremental_base_lsn    ILSN
backup_type     FULL
backup_format   DIRECTORY
mysql_data_dir  MYSQLTEST_VARDIR/mysqld.1/data/
innodb_data_home_dir    MYSQLTEST_VARDIR/mysqld.1/data
innodb_log_group_home_dir       MYSQLTEST_VARDIR/mysqld.1/data
innodb_log_files_in_group       10
innodb_log_file_size    10485760
backup_destination      MYSQLTEST_VARDIR/tmp/mysqlbackup
lock_time       LOCK_TIME
exit_state      SUCCESS
last_error      NO_ERROR
last_error_code 0
[10 Feb 2011 18:51] Valeriy Kravchuk
This is what I see as a result:

mysql> select * from mysql.backup_history\G
*************************** 1. row ***************************
                backup_id: 12973637017769920
                tool_name: bin/mysqlbackup --comments=OPENXS --comments-file=/tmp/comments.txt -uroot --backup-dir=/tmp/backup backup 
               start_time: 2011-02-10 20:48:21
                 end_time: 2011-02-10 20:48:26
               binlog_pos: -1
              binlog_file: BINLOG-DISABLED
        compression_level: 0
                  engines: MEMORY:MyISAM:CSV:PERFORMANCE_SCHEMA:InnoDB:
    innodb_data_file_path: ibdata1:10M:autoextend
       innodb_file_format: Antelope
                start_lsn: 1737728
                  end_lsn: 1739571
     incremental_base_lsn: 1737797
              backup_type: FULL
            backup_format: DIRECTORY
           mysql_data_dir: /Users/openxs/dbs/5.5/data/
innodb_log_group_home_dir: /Users/openxs/dbs/5.5/data/
innodb_log_files_in_group: 2
     innodb_log_file_size: 5242880
       backup_destination: /tmp/backup
                lock_time: 0.000
               exit_state: SUCCESS
               last_error: NO_ERROR
          last_error_code: 0
1 row in set (0.36 sec)

Note "--comments=OPENXS" etc in the tool_name column. Where exactly do you need these values to be presented/stored?
[10 Feb 2011 19:48] Hema Sridharan
It will be good to have separate column for comments and comments-file option in backup_history.logs apart from the one that is mentioned in tool_name.
[15 Feb 2011 13:19] Thava Alagu
Since the comments entry exists with command line, it will be redundant information to add it separately with history table. Also note that we support arbitrarily large comments using comments file. Hence closing this bug. You can open a new feature request if you think it should be added in future release.