Home > Database > Mysql Tutorial > MySQL商业版备份工具使用方法_MySQL

MySQL商业版备份工具使用方法_MySQL

WBOY
Release: 2016-06-01 13:35:13
Original
1050 people have browsed it

bitsCN.com

MySQL商业版备份工具使用方法

 

买了商业版的用户,可以用商业的备份工具来备份MYSQL数据库, 我来示范下如何备份与恢复。其中包括全量备份和增量备份。

备份方法

全量:

 

[sql] 

mysqlbackup --defaults-file="H:/Program Files/MySQL/mysql-advanced-5.6.10-winx64/my.ini" --port=3313 --protocol=tcp --user=root --password   --backup-dir="j:/mysqlbackup" backup-and-apply-log  

-------------------------------------------------------------  

   Parameters Summary  

-------------------------------------------------------------  

   Start LSN                  : 18122752  

   End LSN                    : 18126599  

-------------------------------------------------------------  

 

增量:

 

[sql] 

mysqlbackup --defaults-file="H:/Program Files/MySQL/mysql-advanced-5.6.10-winx64/my.ini" --port=3313 --protocol=tcp --user=root --password --incremental --start-lsn=18126599 --incremental-backup-dir="j:/mysqlbackup_inc" backup  

 

-------------------------------------------------------------  

   Parameters Summary  

-------------------------------------------------------------  

   Start LSN                  : 18126600  

   End LSN                    : 18134788  

-------------------------------------------------------------  

 

把增量合并到全量,已形成全新的全量。

 

[sql] 

mysqlbackup --backup-dir="j:/mysqlbackup" --incremental-backup-dir="j:/mysqlbackup_inc"  apply-incremental-backup  

 

恢复方法

停掉MYSQLD

 

[sql] 

mysqlbackup --defaults-file="H:/Program Files/MySQL/mysql-advanced-5.6.10-winx64/my.ini" --datadir="H:/Program Files/MySQL/mysql-advanced-5.6.10-winx64/data"  --backup-dir="j:/mysqlbackup" copy-back  

 

如果出现以下信息,代表恢复成功,否则失败。

mysqlbackup completed OK!

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template