You are here

FromDual Recovery Manager (rman)

Table of Contents

Where can rman help you

The Recovery Manager (rman) is the counterpart to the Backup Manager (bman). Recovery Manager assists you in restoring and recovering backups of your MariaDB and MySQL databases done with bman or in some cases also with classical backup means like (mariadb-dump, mysqldump, mariadb-backup, xtrabackup and mysqlbackup). Recovery Manager makes your restore easier and safer.

rman example

To give you an impression of the power of the FromDual Recovery Manager let us have a look at a little example:

shell> rman --target=brman:secret@127.0.0.1:3306 --type=full --mode=logical \
  --policy=daily --instance-name=qamariadb102

Progress Indicator

Since version 2.1.0 the FromDual Recovery Manager (rman) has also a progress indicator for the restore of logical backups made with mysqldump.

The Recovery Manager progress indicator logs to STDOUT:

shell> rman --target=brman:secret@127.0.0.1:3306 --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:3306 --type=full --mode=logical --progress --backup-name=bck_qamariadb102_full_2019-08-20_21:15:23.sql --policy=daily --instance-name=qamariadb102 

Options from command line
  target                = brman:******@127.0.0.1:3306
  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:3306
  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=3306
  From backup file: /home/mysql/bck/daily/bck_qamariadb102_full_2019-08-20_21:15:23.sql.gz

  Restore progress:
. 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 test
. . table                                   test       347 statements,         4621 rows,             286528 bytes
. 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 is not significant. We measured less than 1% longer recovery times with the progress indicator compared to pure mysql restoration.

Examples

Example: Monitoring integration (fpmmm)

If you are using the FromDual Performance Monitor for MariaDB and MySQL (fpmmm) and/or Zabbix for database monitoring you can send the backup information also to your monitoring solution for getting trends and see errors or anomalies:

shell> rman --target=brman:secret@127.0.0.1:3306 --type=full --mode=logical \
  --policy=daily --instance-name=qamariadb102 \
  --fpmmm-hostname=mariadb-106 --fpmmm-cache-file=/var/cache/fpmmm/fpmmm.FromDual.mariadb-106.cache