当前位置:网站首页>MySQL restores data through binlog file
MySQL restores data through binlog file
2022-04-23 16:49:00 【A coir boat in the broken white clouds】
-
take dump Unzip the compressed package to /data/dumpback/ Under the table of contents
tar -zxvf back_20220322.tar.gz -C /databak/data
-
Get into mysql perform
# Sign in mysql mysql -uroot -p -S /data/mysql/mysql.sock # Select the target database use zzz_test; # perform sql file ( The data recovery of scheduled backup is completed source /data/dumpback/data/mysql/20220322/zzz_test.sql
-
Use binlog The log will dump Data recovery after time
# see binlog Log on Status (on To open ) show variables like 'log_bin'; # Inquire about BINLOG Format show VARIABLES like 'binlog_format'; # see master Writing BINLOG Information show master status\G; # sign out mysql exit
#cat /etc/my.cnf Check the binary log storage directory log_bin=/data/mysql/logs/mysql-bin
# see binlog file (mysql Restart once ,binlog The file name will change once mysqlbinlog mysql-bin.000006
# According to the time interval binlog Document conversion .sql The file to view /usr/bin/mysqlbinlog --no-defaults --database=zzz_test --base64-output=decode-rows -v --start-datetime='2022-03-25 09:39:10' --stop-datetime="2022-03-25 13:42:10" /var/lib/mysql/my-logbin.000069 >/databak/data/binlog.sql
# Execute binaries according to time ( Restore the data content after the backup time /usr/bin/mysqlbinlog --database=zzz_test --start-datetime='2022-03-25 13:53:29' --stop-datetime='2022-03-25 13:55:01' /var/lib/mysql/my-logbin.000069 | mysql -uroot -p123456
版权声明
本文为[A coir boat in the broken white clouds]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231400068213.html
边栏推荐
- 文件系统读写性能测试实战
- feign报400处理
- Detailed explanation of file operation (2)
- Log4j output log information to file
- Nodejs installation and environment configuration
- Project framework of robot framework
- ByteVCharts可视化图表库,你想要的我都有
- An essay on the classical "tear down the wall in thinking"
- Copy constructor shallow copy and deep copy
- Detailed explanation of UWA pipeline function | visual configuration automatic test
猜你喜欢
NVIDIA显卡驱动报错
feign报400处理
文件操作详解(2)
How much do you know about the process of the interview
Phpstudy V8, a commonly used software for station construction 1 graphic installation tutorial (Windows version) super detailed
STM32__ 03 - beginner timer
【Pygame小游戏】10年前风靡全球的手游《愤怒的小鸟》,是如何霸榜的?经典回归......
ByteVCharts可视化图表库,你想要的我都有
网络安全之渗透靶场实战详解
Gartner 发布新兴技术研究:深入洞悉元宇宙
随机推荐
vscode如何比较两个文件的异同
Take according to the actual situation, classify and summarize once every three levels, and see the figure to know the demand
Gartner announces emerging technology research: insight into the meta universe
关于局域网如何组建介绍
Creation of RAID disk array and RAID5
About background image gradient()!
On the value, breaking and harvest of NFT project
PyTorch:train模式与eval模式的那些坑
Blue Bridge Cup provincial road 06 -- the second game of the 12th provincial competition
Use case execution of robot framework
Mock test
Cartoon: what are IAAs, PAAS, SaaS?
5分钟NLP:Text-To-Text Transfer Transformer (T5)统一的文本到文本任务模型
5-minute NLP: text to text transfer transformer (T5) unified text to text task model
Loading order of logback configuration file
Detailed explanation of Niuke - Gloves
LVM与磁盘配额
【Pygame小游戏】10年前风靡全球的手游《愤怒的小鸟》,是如何霸榜的?经典回归......
04 Lua operator
◰GL-阴影贴图核心步骤