You are here

FromDual Recovery Manager (rman) with progress indicator

Since version 2.1.0 the FromDual Recovery Manager (rman) for MariaDB and MySQL has also a progress indicator for the restore of logical backups made with mysqldump. This feature was implemented because of the numerous requests of FromDual rman users who were not happy with the default mysql behavior.

You can check your current rman version as follows:

# ./bin/rman --version
2.2.1

As with all FromDual tools you get a command overview with examples with the --help option:

# ./bin/rman --help | less
...
  progress      Print progress information to STDOUT.
...

A backup for example is done as follows:

# ./bin/bman --target=brman:secret@127.0.0.1:3308 --type=full --mode=logical --policy=daily --instance-name=qamariadb102

The Recovery Manager progress indicator logs to STDOUT:

# ./bin/rman --target=brman:secret@127.0.0.1:3308 --type=full --mode=logical --policy=daily --instance-name=qamariadb102 --progress --backup-name=bck_qamariadb102_full_2019-08-20_21:15:23.sql

Reading configuration from /etc/mysql/my.cnf
No rman configuration file.

Command line: /home/mysql/product/brman-2.2.1/bin/rman.php --target=brman:******@127.0.0.1:3308 --type=full --mode=logical --policy=daily --instance-name=qamariadb102 --progress --backup-name=bck_qamariadb102_full_2019-08-20_21:15:23.sql

Options from command line
  target                = brman:******@127.0.0.1:3308
  type                  = full
  mode                  = logical
  progress              = 
  backup-name           = bck_qamariadb102_full_2019-08-20_21:15:23.sql
  policy                = daily
  instance-name         = qamariadb102

Resulting options
  target                = brman:******@127.0.0.1:3308
  type                  = full
  mode                  = logical
  progress              = 
  backup-name           = bck_qamariadb102_full_2019-08-20_21:15:23.sql
  policy                = daily
  instance-name         = qamariadb102
  log                   = ./rman.log
  datadir               = /var/lib/mysql
  owner                 = mysql
  backupdir             = /home/mysql/bck
  binlog-policy         = binlog


Logging to   ./rman.log
Backupdir is /home/mysql/bck
Version is   2.2.1

Start restore at 2019-08-20 21:18:46
  mysql --user=brman --password=****** --host=127.0.0.1 --port=3308
  From backup file: /home/mysql/bck/daily/bck_qamariadb102_full_2019-08-20_21:15:23.sql.gz

  Restore progress:
. schema brman_catalog
. . table                         backup_details         0 statements,            0 rows,                  0 bytes
. . table                                backups         0 statements,            0 rows,                  0 bytes
. . table                            binary_logs         0 statements,            0 rows,                  0 bytes
. . table                                  files         0 statements,            0 rows,                  0 bytes
. . table                               metadata         1 statements,            2 rows,                 78 bytes
. schema foodmart
. schema fromdual_a
. . table                                  audit         1 statements,            3 rows,                171 bytes
. . table                                     c1         1 statements,            3 rows,                 42 bytes
. . table                                     c2         1 statements,            3 rows,                 42 bytes
. . table                                  child         1 statements,            3 rows,                177 bytes
. . table                                 parent         1 statements,            3 rows,                175 bytes
. schema fromdual_b
. . table                                  audit         1 statements,            3 rows,                171 bytes
. . table                                     c1         1 statements,            3 rows,                 42 bytes
. . table                                     c2         1 statements,            3 rows,                 42 bytes
. . table                                  child         1 statements,            3 rows,                177 bytes
. . table                              employees         0 statements,            0 rows,                  0 bytes
. . table                                 parent         1 statements,            3 rows,                175 bytes
. schema fromdual_c
. . table                                  audit         1 statements,            3 rows,                171 bytes
. . table                                     c1         1 statements,            3 rows,                 42 bytes
. . table                                     c2         1 statements,            3 rows,                 42 bytes
. . table                                  child         1 statements,            3 rows,                177 bytes
. . table                                 parent         1 statements,            3 rows,                175 bytes
. schema mysql
. . table                           column_stats         0 statements,            0 rows,                  0 bytes
. . table                           columns_priv         0 statements,            0 rows,                  0 bytes
. . table                                     db         1 statements,            2 rows,                267 bytes
. . table                                  event         0 statements,            0 rows,                  0 bytes
. . table                                   func         0 statements,            0 rows,                  0 bytes
. . table                         gtid_slave_pos         0 statements,            0 rows,                  0 bytes
. . table                          help_category         1 statements,           39 rows,               1202 bytes
. . table                           help_keyword         1 statements,          464 rows,               7649 bytes
. . table                          help_relation         1 statements,         1028 rows,               9861 bytes
. . table                             help_topic         1 statements,          527 rows,             419915 bytes
. . table                                   host         0 statements,            0 rows,                  0 bytes
. . table                            index_stats         0 statements,            0 rows,                  0 bytes
. . table                     innodb_index_stats         1 statements,          207 rows,              20611 bytes
. . table                     innodb_table_stats         1 statements,           29 rows,               1622 bytes
. . table                                 plugin         0 statements,            0 rows,                  0 bytes
. . table                                   proc         1 statements,            2 rows,               2220 bytes
. . table                             procs_priv         0 statements,            0 rows,                  0 bytes
. . table                           proxies_priv         1 statements,            2 rows,                140 bytes
. . table                          roles_mapping         0 statements,            0 rows,                  0 bytes
. . table                                servers         0 statements,            0 rows,                  0 bytes
. . table                            table_stats         0 statements,            0 rows,                  0 bytes
. . table                            tables_priv         0 statements,            0 rows,                  0 bytes
. . table                              time_zone         0 statements,            0 rows,                  0 bytes
. . table                  time_zone_leap_second         0 statements,            0 rows,                  0 bytes
. . table                         time_zone_name         0 statements,            0 rows,                  0 bytes
. . table                   time_zone_transition         0 statements,            0 rows,                  0 bytes
. . table              time_zone_transition_type         0 statements,            0 rows,                  0 bytes
. . table                                   user         1 statements,            5 rows,               1042 bytes
. . table                            general_log         0 statements,            0 rows,                  0 bytes
. . table                               slow_log         0 statements,            0 rows,                  0 bytes
. schema test
. . table                                   test       347 statements,         4621 rows,             286528 bytes
. schema test_catalog
. schema world
. . table                                   City         1 statements,         4079 rows,             177139 bytes
. . table                                Country         1 statements,          239 rows,              36481 bytes
. . table                        CountryLanguage         1 statements,          984 rows,              26160 bytes
. schema brman_catalog
. schema foodmart
. schema fromdual_a
. schema fromdual_b
. schema fromdual_c
. schema mysql
. schema test
. schema test_catalog
. schema world
  Schemas: 9, Tables: 55, Statements: 376, Rows: 12275, Bytes: 992736
  WARNING: Progress numbers for Total Byte Counter may be different of dump file size.
  
  Restore time was: 0d 0h 1' 28"
End restore at 2019-08-20 21:20:14 (rc=0)

The overhead of FromDual Recovery Manager progress indicator for MariaDB and MySQL is not significant. We measured less than 1% longer recovery times with the progress indicator compared to pure mysql restoration.