Thứ Ba, 13 tháng 12, 2016

How to Back Up MySQL Server using MySQL Enterprise Backup (MEB)

 In order to be able to use MySQL Enterprise Backup to perform a backup of a MySQL Server instance, the following MySQL options must be specified in the configuration file of the server instance, under the [mysqld] section (substitute ... with any valid values):

datadir=...
innodb_data_home_dir=...
innodb_data_file_path=...
innodb_log_group_home_dir=...
innodb_log_files_in_group=...
innodb_log_file_size=...


Alternately you can use a new configuration file, that contains just the options above, and pass it to MySQL Enterprise Backup.

If your settings file doesn't have those settings, you can retrieve the current values of these variables by executing the following queries, for example using the mysql client:

SHOW VARIABLES LIKE 'datadir';
SHOW VARIABLES LIKE 'innodb_data_home_dir';
SHOW VARIABLES LIKE 'innodb_data_file_path';
SHOW VARIABLES LIKE 'innodb_log_group_home_dir';
SHOW VARIABLES LIKE 'innodb_log_files_in_group';
SHOW VARIABLES LIKE 'innodb_log_file_size';

1. Backup Database to image_files
   
[root@kiloccnp ~]# mysqlbackup --socket=/var/run/mysqld/mysql.sock --user=root --password=XXXX --backup-image=/BackUP_Test_2/kilo.mbi --backup-dir=/BackUP_Test_2/ backup-to-image

MySQL Enterprise Backup version 3.12.3 Linux-3.8.13-16.2.1.el6uek.x86_64-x86_64 [2016/05/05]
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All Rights Reserved.

 mysqlbackup: INFO: Starting with following command line ...
 mysqlbackup --socket=/var/run/mysqld/mysql.sock --user=root
        --password=xxxxxxxxx --backup-image=/BackUP_Test_2/kilo.mbi
        --backup-dir=/BackUP_Test_2/ backup-to-image

 mysqlbackup: INFO:
 mysqlbackup: INFO: MySQL server version is '5.6.34-log'.
 mysqlbackup: INFO: Got some server configuration information from running server.

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

161214 09:53:14 mysqlbackup: INFO: MEB logfile created at /BackUP_Test_2/meta/MEB_2016-12-14.09-53-14_image_backup.log

--------------------------------------------------------------------
                       Server Repository Options:
--------------------------------------------------------------------
  datadir = /usr/local/mysql/data/
  innodb_data_home_dir =
  innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:100M:autoextend
  innodb_log_group_home_dir = /usr/local/mysql/data/
  innodb_log_files_in_group = 2
  innodb_log_file_size = 2147483648
  innodb_page_size = 16384
  innodb_checksum_algorithm = innodb
  innodb_undo_directory = /usr/local/mysql/data/
  innodb_undo_tablespaces = 0
  innodb_undo_logs = 128

--------------------------------------------------------------------
                       Backup Config Options:
--------------------------------------------------------------------
  datadir = /BackUP_Test_2/datadir
  innodb_data_home_dir = /BackUP_Test_2/datadir
  innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:100M:autoextend
  innodb_log_group_home_dir = /BackUP_Test_2/datadir
  innodb_log_files_in_group = 2
  innodb_log_file_size = 2147483648
  innodb_page_size = 16384
  innodb_checksum_algorithm = innodb
  innodb_undo_directory = /BackUP_Test_2/datadir
  innodb_undo_tablespaces = 0
  innodb_undo_logs = 128

Backup Image Path = /BackUP_Test_2/kilo.mbi
 mysqlbackup: INFO: Unique generated backup id for this is 14816839942264581

 mysqlbackup: INFO: Creating 14 buffers each of size 16777216.
161214 09:53:16 mysqlbackup: INFO: Full Image Backup operation starts with following threads
                1 read-threads    6 process-threads    1 write-threads
161214 09:53:16 mysqlbackup: INFO: System tablespace file format is Antelope.
161214 09:53:16 mysqlbackup: INFO: Starting to copy all innodb files...
 mysqlbackup: INFO: Could not find binlog index file. binlogs will not be copied for this backup.
 Point-In-Time-Recovery will not be possible.
 If this is online backup then server may not have started with --log-bin.
 You may specify its location with --log-bin-index option.
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/backup-my.cnf.
161214 09:53:16 mysqlbackup: INFO: Found checkpoint at lsn 223775777.
161214 09:53:16 mysqlbackup: INFO: Starting log scan from lsn 223775744.
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/meta/backup_create.xml.
161214 09:53:16 mysqlbackup: INFO: Copying log...
161214 09:53:16 mysqlbackup: INFO: Copying /usr/local/mysql/data/ibdata1 (Antelope file format).
161214 09:53:16 mysqlbackup: INFO: Log copied, lsn 223775777.
 mysqlbackup: Progress in MB: 200 400 600 800 1000 1200 1400 1600 1800
161214 09:54:09 mysqlbackup: INFO: Copying /usr/local/mysql/data/ibdata2 (Antelope file format).
 mysqlbackup: Progress in MB: 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800
161214 09:55:03 mysqlbackup: INFO: Copying /usr/local/mysql/data/ibdata3 (Antelope file format).
 mysqlbackup: Progress in MB: 4000 4200 4400 4600 4800 5000 5200 5400 5600 5800
161214 09:55:58 mysqlbackup: INFO: Copying /usr/local/mysql/data/ibdata4 (Antelope file format).
 mysqlbackup: Progress in MB: 6000
161214 09:56:00 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/ArcSight/UninstallerData' inside source database directory.
161214 09:56:00 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/ArcSight/current' inside source database directory.
161214 09:56:00 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/ArcSight/data' inside source database directory.
161214 09:56:00 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/ArcSight/updates' inside source database directory.
161214 09:56:00 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/ArcSight/userdata' inside source database directory.
161214 09:56:00 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/images/101' inside source database directory.
161214 09:56:00 mysqlbackup: INFO: Copying /usr/local/mysql/data/mysql/innodb_index_stats.ibd (Antelope file format).
161214 09:56:00 mysqlbackup: INFO: Copying /usr/local/mysql/data/mysql/innodb_table_stats.ibd (Antelope file format).
161214 09:56:00 mysqlbackup: INFO: Copying /usr/local/mysql/data/mysql/slave_master_info.ibd (Antelope file format).
161214 09:56:00 mysqlbackup: INFO: Copying /usr/local/mysql/data/mysql/slave_relay_log_info.ibd (Antelope file format).
161214 09:56:00 mysqlbackup: INFO: Copying /usr/local/mysql/data/mysql/slave_worker_info.ibd (Antelope file format).
161214 09:56:00 mysqlbackup: INFO: Copying /usr/local/mysql/data/sys/sys_config.ibd (Antelope file format).
161214 09:56:00 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/template/cache' inside source database directory.

. . . .

161214 09:56:06 mysqlbackup: INFO: A copied database page was modified at 223775777.
          (This is the highest lsn found on page)
          Scanned log up to lsn 223775777.
          Was able to parse the log up to lsn 223775777.
          Maximum page number for a log record 0
161214 09:56:06 mysqlbackup: INFO: All tables unlocked
161214 09:56:06 mysqlbackup: INFO: All MySQL tables were locked for 2.070 seconds.
161214 09:56:06 mysqlbackup: INFO: Reading all global variables from the server.
161214 09:56:06 mysqlbackup: INFO: Completed reading of all global variables from the server.
161214 09:56:06 mysqlbackup: INFO: Creating server config files server-my.cnf and server-all.cnf in /BackUP_Test_2/
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/meta/backup_variables.txt.
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/datadir/ibbackup_logfile.
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/server-all.cnf.
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/server-my.cnf.
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/meta/backup_content.xml.
 mysqlbackup: INFO: Copying meta file /BackUP_Test_2/meta/image_files.xml.
161214 09:56:09 mysqlbackup: INFO: Full Image Backup operation completed successfully.
161214 09:56:09 mysqlbackup: INFO: Backup image created successfully.
 mysqlbackup: INFO: Image Path = /BackUP_Test_2/kilo.mbi

-------------------------------------------------------------
   Parameters Summary        
-------------------------------------------------------------
   Start LSN                  : 223775744
   End LSN                    : 223775777
-------------------------------------------------------------


mysqlbackup completed OK! with 33 warnings
[root@kiloccnp ~]#
[root@kiloccnp ~]# ll /BackUP_Test_2/
total 6420508
-rw-r--r-- 1 root root        290 Dec 14 09:53 backup-my.cnf
drwx------ 2 root root       4096 Dec 14 09:56 datadir
-rw-r--r-- 1 root root 6574558914 Dec 14 09:56 kilo.mbi
drwx------ 2 root root       4096 Dec 14 09:56 meta
-rw-r--r-- 1 root root      13003 Dec 14 09:56 server-all.cnf
-rw-r--r-- 1 root root       4568 Dec 14 09:56 server-my.cnf

[root@kiloccnp ~]# ll /BackUP_Test_2/datadir/
total 0
[root@kiloccnp ~]# ll /BackUP_Test_2/meta/
total 164
-rw-r--r-- 1 root root 97950 Dec 14 09:56 backup_content.xml
-rw-r--r-- 1 root root  6444 Dec 14 09:53 backup_create.xml
-rw-r--r-- 1 root root   265 Dec 14 09:56 backup_variables.txt
-rw-r--r-- 1 root root 37033 Dec 14 09:56 image_files.xml
-rw-r--r-- 1 root root 12574 Dec 14 09:56 MEB_2016-12-14.09-53-14_image_backup.log

[root@kiloccnp ~]#


2. Restoring Database from image_files
 To restore a MySQL instance from a backup:
  1.     Shut down the database server
  2.  Use, for example, mysqlbackup with the copy-back-and-apply-log command, which makes the raw backup into a prepared backup by updating it to a consistent state and then copies the tables, indexes, metadata, and any other required files back to their original locations, as defined by the original MySQL configuration file.
  •      --defaults-file supplies the configuration file backup-my.cnf, which was created in the temporary directory you specified with --backup-dir when you created the single-image backup
  •     --datadir supplies the location of the data directory for restoring the data.
  •     --backup-image provides the path of the single-file backup.
  •     --backup-dir provides the location of an empty folder to store some temporary files created during the restore procedure
   
[root@kiloccnp ~]# ll /data/
total 10440808
drwxr-x---  7 root  kilo_arc       4096 Dec  6 17:23 ArcSight
-rw-rw----. 1 mysql mysql            56 Oct 28 19:07 auto.cnf
drwxr-xr-x. 2 root  root           4096 Nov  9 15:21 BACKUP
-rw-rw----. 1 mysql mysql    2097152000 Dec 13 17:39 ibdata1
-rw-rw----. 1 mysql mysql    2097152000 Dec 13 13:24 ibdata2
-rw-rw----. 1 mysql mysql    2097152000 Dec 13 13:24 ibdata3
-rw-rw----. 1 mysql mysql     104857600 Dec 13 13:24 ibdata4
-rw-rw----. 1 mysql mysql    2147483648 Dec 13 17:39 ib_logfile0
-rw-rw----. 1 mysql mysql    2147483648 Oct 29 10:24 ib_logfile1
drwxr-xr-x  3 root  root           4096 Nov 29 14:07 images
drwx------. 2 mysql mysql          4096 Dec 14 09:08 mysql
drwx------. 2 mysql mysql          4096 Oct 29 09:00 performance_schema
drwxr-xr-x  2 root  root           4096 Nov 29 14:05 private
drwx------  2 mysql mysql          4096 Dec 13 16:14 sys
drwxr-xr-x  4 root  root           4096 Nov 29 14:05 template
drwxr-xr-x. 2 mysql mysql          4096 Dec 13 15:28 test
-rw-r-----. 1 mysql mysql         33891 Oct 29 09:01 kiloccnp.err
-rw-rw----. 1 mysql mysql             6 Oct 29 09:01 kiloccnp.pid
drwx------  2 mysql mysql          4096 Dec 13 16:21 kiloccnp

 
[root@kiloccnp ~]# rm /data/test/ -rf
[root@kiloccnp ~]# /etc/init.d/mysql stop
Shutting down MySQL....[  OK  ]
[root@kiloccnp ~]#mysqlbackup  --defaults-file=/BackUP_Test_2/server-my.cnf  --datadir=/data --backup-image=/BackUP_Test_2/kilo.mbi --backup-dir=/BackUP_Test/ copy-back-and-apply-log --force

MySQL Enterprise Backup version 3.12.3 Linux-3.8.13-16.2.1.el6uek.x86_64-x86_64 [2016/05/05]
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All Rights Reserved.

 mysqlbackup: INFO: Starting with following command line ...
 mysqlbackup --defaults-file=/BackUP_Test_2/server-my.cnf --datadir=/data
        --backup-image=/BackUP_Test_2/kilo.mbi --backup-dir=/BackUP_Test/
        copy-back-and-apply-log --force

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

 mysqlbackup: INFO: Backup Image MEB version string: 3.12.3 [2016/05/05]
161214 10:04:35 mysqlbackup: INFO: MEB logfile created at /BackUP_Test/meta/MEB_2016-12-14.10-04-35_copy_back_img_to_datadir.log

--------------------------------------------------------------------
                       Server Repository Options:
--------------------------------------------------------------------
  datadir = /data
  innodb_data_home_dir = /data
  innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:100M:autoextend
  innodb_log_group_home_dir = /data/
  innodb_log_files_in_group = 2
  innodb_log_file_size = 2147483648
  innodb_page_size = 16384
  innodb_checksum_algorithm = innodb
  innodb_undo_directory = /data/
  innodb_undo_tablespaces = 0
  innodb_undo_logs = 128

--------------------------------------------------------------------
                       Backup Config Options:
--------------------------------------------------------------------
  datadir = /BackUP_Test/datadir
  innodb_data_home_dir = /BackUP_Test/datadir
  innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:100M:autoextend
  innodb_log_group_home_dir = /BackUP_Test/datadir
  innodb_log_files_in_group = 2
  innodb_log_file_size = 2147483648
  innodb_page_size = 16384
  innodb_checksum_algorithm = innodb


 mysqlbackup: INFO: Creating 14 buffers each of size 16777216.
161214 10:04:35 mysqlbackup: INFO: Copy-back-and-apply-log operation starts with following threads
                1 read-threads    6 process-threads    1 write-threads
161214 10:04:35 mysqlbackup: INFO: Copying database directory: meta
161214 10:04:35 mysqlbackup: INFO: Copying datadir/ibdata1.
 mysqlbackup: Progress in MB: 200 400 600 800 1000 1200 1400 1600 1800
161214 10:06:22 mysqlbackup: INFO: Copying datadir/ibdata2.
 mysqlbackup: Progress in MB: 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800
161214 10:08:13 mysqlbackup: INFO: Copying datadir/ibdata3.
 mysqlbackup: Progress in MB: 4000 4200 4400 4600 4800 5000 5200 5400 5600 5800
161214 10:10:08 mysqlbackup: INFO: Copying datadir/ibdata4.
 mysqlbackup: Progress in MB: 6000
161214 10:10:14 mysqlbackup: INFO: Copying database directory: datadir/.oracle_jre_usage
161214 10:10:14 mysqlbackup: INFO: Copying database directory: datadir/ArcSight
161214 10:10:14 mysqlbackup: INFO: Copying database directory: datadir/BACKUP
161214 10:10:14 mysqlbackup: INFO: Copying database directory: datadir/images
161214 10:10:14 mysqlbackup: INFO: Copying database directory: datadir/mysql
161214 10:10:14 mysqlbackup: INFO: Copying datadir/mysql/innodb_index_stats.ibd.
161214 10:10:14 mysqlbackup: INFO: Copying datadir/mysql/innodb_table_stats.ibd.
161214 10:10:14 mysqlbackup: INFO: Copying datadir/mysql/slave_master_info.ibd.

....
161214 10:10:24 mysqlbackup: INFO: Creating server config files server-my.cnf and server-all.cnf in /data
161214 10:10:24 mysqlbackup: INFO: Copy-back operation completed successfully.
 mysqlbackup: INFO: Source Image Path = /BackUP_Test_2/kilo.mbi

.....
 mysqlbackup: INFO: Creating 14 buffers each of size 65536.
161214 10:10:24 mysqlbackup: INFO: Apply-log operation starts with following threads
                1 read-threads    1 process-threads
 mysqlbackup: INFO: Using up to 100 MB of memory.
161214 10:10:24 mysqlbackup: INFO: ibbackup_logfile's creation parameters:
          start lsn 223775744, end lsn 223775777,
          start checkpoint 223775777.
 mysqlbackup: ERROR: InnoDB: Attempted to open a previously opened tablespace. Previous tablespace test/City uses space ID: 3 at filepath: /data/test/City.ibd. Cannot open tablespace mysql/slave_relay_log_info which uses space ID: 3 at filepath: /data/mysql/slave_relay_log_info.ibd2016-12-14 10:10:24 7ff1d9377720  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: Error: could not open single-table tablespace file /data/mysql/slave_relay_log_info.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

[root@kiloccnp ~]#
[root@kiloccnp ~]# ll /data/
total 6246524
drwxr-x---  7 root  kilo_arc       4096 Dec  6 17:23 ArcSight
-rw-rw----. 1 mysql mysql            56 Oct 28 19:07 auto.cnf
drwxr-xr-x. 2 root  root           4096 Nov  9 15:21 BACKUP
-rw-r--r--  1 root  root             70 Dec 14 10:10 backup_variables.txt
-rw-rw----. 1 mysql mysql    2097152000 Dec 14 10:06 ibdata1
-rw-rw----. 1 mysql mysql    2097152000 Dec 14 10:08 ibdata2
-rw-rw----. 1 mysql mysql    2097152000 Dec 14 10:10 ibdata3
-rw-rw----. 1 mysql mysql     104857600 Dec 14 10:10 ibdata4
drwxr-xr-x  3 root  root           4096 Nov 29 14:07 images
drwx------. 2 mysql mysql          4096 Dec 14 09:08 mysql
drwx------. 2 mysql mysql          4096 Oct 29 09:00 performance_schema
drwxr-xr-x  2 root  root           4096 Nov 29 14:05 private
-rw-r--r--  1 root  root          12992 Dec 14 10:10 server-all.cnf
-rw-r--r--  1 root  root           4594 Dec 14 10:10 server-my.cnf
drwx------  2 mysql mysql          4096 Dec 13 16:14 sys
drwxr-xr-x  4 root  root           4096 Nov 29 14:05 template
drwx------  2 root  root           4096 Dec 14 10:10 test
-rw-r-----. 1 mysql mysql         33891 Oct 29 09:01 kiloccnp.err
-rw-rw----. 1 mysql mysql             6 Oct 29 09:01 kiloccnp.pid
drwx------  2 mysql mysql          4096 Dec 13 16:21 kiloccnp

[root@kiloccnp ~]#    
   
3. Backup file
   

[root@kiloccnp ~]# mysqlbackup --socket=/var/run/mysqld/mysql.sock --user=root --password=xxxxxxxxx --backup-dir=/BackUP_Test/ backup
MySQL Enterprise Backup version 3.12.3 Linux-3.8.13-16.2.1.el6uek.x86_64-x86_64 [2016/05/05]
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All Rights Reserved.

 mysqlbackup: INFO: Starting with following command line ...
 mysqlbackup --socket=/var/run/mysqld/mysql.sock --user=root
        --password=xxxxxxxxx --backup-dir=/BackUP_Test/ backup

 mysqlbackup: INFO:
 mysqlbackup: INFO: MySQL server version is '5.6.34-log'.
 mysqlbackup: INFO: Got some server configuration information from running server.

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

161214 09:16:40 mysqlbackup: INFO: MEB logfile created at /BackUP_Test/meta/MEB_2016-12-14.09-16-40_backup.log

--------------------------------------------------------------------
                       Server Repository Options:
--------------------------------------------------------------------
  datadir = /usr/local/mysql/data/
  innodb_data_home_dir =
  innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:100M:autoextend
  innodb_log_group_home_dir = /usr/local/mysql/data/
  innodb_log_files_in_group = 2
  innodb_log_file_size = 2147483648
  innodb_page_size = 16384
  innodb_checksum_algorithm = innodb
  innodb_undo_directory = /usr/local/mysql/data/
  innodb_undo_tablespaces = 0
  innodb_undo_logs = 128

--------------------------------------------------------------------
                       Backup Config Options:
--------------------------------------------------------------------
  datadir = /BackUP_Test/datadir
  innodb_data_home_dir = /BackUP_Test/datadir
  innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:2000M;ibdata4:100M:autoextend
  innodb_log_group_home_dir = /BackUP_Test/datadir
  innodb_log_files_in_group = 2
  innodb_log_file_size = 2147483648
  innodb_page_size = 16384
  innodb_checksum_algorithm = innodb
  innodb_undo_directory = /BackUP_Test/datadir
  innodb_undo_tablespaces = 0
  innodb_undo_logs = 128

 mysqlbackup: INFO: Unique generated backup id for this is 14816818005243781

 mysqlbackup: INFO: Creating 14 buffers each of size 16777216.
161214 09:16:42 mysqlbackup: INFO: Full Backup operation starts with following threads
                1 read-threads    6 process-threads    1 write-threads
161214 09:16:42 mysqlbackup: INFO: System tablespace file format is Antelope.
161214 09:16:42 mysqlbackup: INFO: Starting to copy all innodb files...
 mysqlbackup: INFO: Could not find binlog index file. binlogs will not be copied for this backup.
 Point-In-Time-Recovery will not be possible.
 If this is online backup then server may not have started with --log-bin.
 You may specify its location with --log-bin-index option.
161214 09:16:42 mysqlbackup: INFO: Found checkpoint at lsn 223775777.
161214 09:16:42 mysqlbackup: INFO: Starting log scan from lsn 223775744.
161214 09:16:42 mysqlbackup: INFO: Copying log...
161214 09:16:42 mysqlbackup: INFO: Copying /usr/local/mysql/data/ibdata1 (Antelope file format).
161214 09:16:42 mysqlbackup: INFO: Log copied, lsn 223775777.
 mysqlbackup: Progress in MB: 200 400 600 800 1000 1200 1400 1600 1800
161214 09:17:35 mysqlbackup: INFO: Copying /usr/local/mysql/data/ibdata2 (Antelope file format).
 mysqlbackup: Progress in MB: 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800
161214 09:18:28 mysqlbackup: INFO: Copying /usr/local/mysql/data/ibdata3 (Antelope file format).
 mysqlbackup: Progress in MB: 4000 4200 4400 4600 4800 5000 5200 5400 5600 5800

...
161214 09:19:55 mysqlbackup: INFO: Copying the database directory 'performance_schema'
161214 09:19:55 mysqlbackup: INFO: Copying the database directory 'private'
161214 09:19:55 mysqlbackup: INFO: Copying the database directory 'sys'
161214 09:19:55 mysqlbackup: INFO: Copying the database directory 'template'
161214 09:19:55 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/template/cache' inside source database directory.
161214 09:19:55 mysqlbackup: WARNING: Ignoring subdirectory '/usr/local/mysql/data/template/iso' inside source database directory.
161214 09:19:55 mysqlbackup: INFO: Copying the database directory 'test'
161214 09:19:55 mysqlbackup: INFO: Copying the database directory 'kiloccnp_test'
161214 09:19:55 mysqlbackup: INFO: Completing the copy of all non-innodb files.
...
161214 09:19:57 mysqlbackup: INFO: A copied database page was modified at 223775777.
          (This is the highest lsn found on page)
          Scanned log up to lsn 223775777.
          Was able to parse the log up to lsn 223775777.
          Maximum page number for a log record 0
161214 09:19:57 mysqlbackup: INFO: All tables unlocked
161214 09:19:57 mysqlbackup: INFO: All MySQL tables were locked for 25.428 seconds.
161214 09:19:57 mysqlbackup: INFO: Reading all global variables from the server.
161214 09:19:57 mysqlbackup: INFO: Completed reading of all global variables from the server.
161214 09:19:57 mysqlbackup: INFO: Creating server config files server-my.cnf and server-all.cnf in /BackUP_Test/
161214 09:19:58 mysqlbackup: INFO: Full Backup operation completed successfully.
161214 09:19:58 mysqlbackup: INFO: Backup created in directory '/BackUP_Test/'

-------------------------------------------------------------
   Parameters Summary       
-------------------------------------------------------------
   Start LSN                  : 223775744
   End LSN                    : 223775777
-------------------------------------------------------------

mysqlbackup completed OK! with 34 warnings

[root@kiloccnp ~]#

[root@kiloccnp ~]# ll /BackUP_Test/
total 36
-rw-r--r--  1 root root   290 Dec 14 09:16 backup-my.cnf
drwx------ 15 root root  4096 Dec 14 09:19 datadir
drwx------  2 root root  4096 Dec 14 09:19 meta
-rw-r--r--  1 root root 13003 Dec 14 09:19 server-all.cnf
-rw-r--r--  1 root root  4568 Dec 14 09:19 server-my.cnf

[root@kiloccnp ~]# ll /BackUP_Test/meta/
total 104
-rw-r--r-- 1 root root 78025 Dec 14 09:19 backup_content.xml
-rw-r--r-- 1 root root  6666 Dec 14 09:16 backup_create.xml
-rw-r--r-- 1 root root   265 Dec 14 09:19 backup_variables.txt
-rw-r--r-- 1 root root 12100 Dec 14 09:19 MEB_2016-12-14.09-16-40_backup.log
[root@kiloccnp ~]#


[root@kiloccnp ~]# ll /BackUP_Test/datadir/
total 6246464
drwx------ 2 root root       4096 Dec 14 09:19 kiloccnp
drwx------ 2 root root       4096 Dec 14 09:19 BACKUP
drwx------ 2 root root       4096 Dec 14 09:19 dump
-rw-r--r-- 1 root root       1024 Dec 14 09:19 ibbackup_logfile
-rw-r--r-- 1 root root 2097152000 Dec 14 09:17 ibdata1
-rw-r--r-- 1 root root 2097152000 Dec 14 09:18 ibdata2
-rw-r--r-- 1 root root 2097152000 Dec 14 09:19 ibdata3
-rw-r--r-- 1 root root  104857600 Dec 14 09:19 ibdata4
drwx------ 2 root root       4096 Dec 14 09:19 images
drwx------ 2 root root       4096 Dec 14 09:19 lost+found
drwx------ 2 root root       4096 Dec 14 09:19 mysql
drwx------ 2 root root       4096 Dec 14 09:19 performance_schema
drwx------ 2 root root       4096 Dec 14 09:19 private
drwx------ 2 root root       4096 Dec 14 09:19 sys
drwx------ 2 root root       4096 Dec 14 09:19 template
drwx------ 2 root root       4096 Dec 14 09:19 test
drwx------ 2 root root       4096 Dec 14 09:19 kiloccnp_test

[root@kiloccnp ~]#

Không có nhận xét nào:

Đăng nhận xét