MySQL Enterprise Backup Part II


Last time I used MySQL Enterprise Backup to save an entire database. Now it is time to test that backup. The first step is to shutdown the MySQL server using mysqladmin.

bin# ./mysqlbackup --defaults-file=/etc/mysql/my.cnf --backup-dir=/home/dstokes/foo2 copy-back
MySQL Enterprise Backup version 3.6.0 [2011/07/01]
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All Rights Reserved.

INFO: Starting with following command line ...
./mysqlbackup --defaults-file=/etc/mysql/my.cnf
--backup-dir=/home/dstokes/foo2 copy-back

IMPORTANT: Please check that mysqlbackup run completes successfully.
At the end of a successful 'copy-back' run mysqlbackup
prints "mysqlbackup completed OK!".

mysqlbackup: INFO: Server repository configuration:
datadir = /usr/local/mysql/data
innodb_data_home_dir = /usr/local/mysql/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data
innodb_log_files_in_group = 2
innodb_log_file_size = 64M

mysqlbackup: INFO: Backup repository configuration:
datadir = /home/dstokes/foo2/datadir
innodb_data_home_dir = /home/dstokes/foo2/datadir
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /home/dstokes/foo2/datadir
innodb_log_files_in_group = 2
innodb_log_file_size = 67108864

mysqlbackup: INFO: Starting to copy back files
mysqlbackup: INFO: in '/home/dstokes/foo2/datadir' directory
mysqlbackup: INFO: back to original data directory '/usr/local/mysql/data'
mysqlbackup: INFO: Copying back directory '/home/dstokes/foo2/datadir/grimm'
mysqlbackup: INFO: Copying back directory '/home/dstokes/foo2/datadir/mysql'
mysqlbackup: INFO: Copying back directory '/home/dstokes/foo2/datadir/performance_schema'
mysqlbackup: INFO: Copying back directory '/home/dstokes/foo2/datadir/test'
mysqlbackup: INFO: Copying back directory '/home/dstokes/foo2/datadir/world'
mysqlbackup: INFO: Starting to copy back InnoDB tables and indexes
in '/home/dstokes/foo2' back to original InnoDB data directory: /usr/local/mysql/data
mysqlbackup: INFO: Copying back file '/home/dstokes/foo2/datadir/ibdata1'
mysqlbackup: INFO: Starting to copy back InnoDB log files
in '/home/dstokes/foo2/datadir' back to original InnoDB log directory '/usr/local/mysql/data'
mysqlbackup: INFO: Copying back file '/home/dstokes/foo2/datadir/ib_logfile0'
mysqlbackup: INFO: Copying back file '/home/dstokes/foo2/datadir/ib_logfile1'
mysqlbackup: INFO: Finished copying backup files.

Restart the server and connecting shows the database is the expected state.

Next time: We will explore MEB deeper including compression, incremental backups, and some other useful features.

About these ads

Leave a comment

Filed under MySQL Enterprise

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s