当前位置:网站首页>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
边栏推荐
- Log4j output log information to file
- Derivation of Σ GL perspective projection matrix
- 漫画:什么是IaaS、PaaS、SaaS?
- Sail soft calls the method of dynamic parameter transfer and sets parameters in the title
- Kunteng full duplex digital wireless transceiver chip kt1605 / kt1606 / kt1607 / kt1608 is suitable for interphone scheme
- Deepinv20 installation MariaDB
- ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
- Zhongang Mining: Fluorite Flotation Process
- STM32__ 03 - beginner timer
- File upload and download of robot framework
猜你喜欢
文件操作详解(2)
Gartner 發布新興技術研究:深入洞悉元宇宙
Do you really understand the principle of code scanning login?
漫画:什么是IaaS、PaaS、SaaS?
Set the color change of interlaced lines in cells in the sail software and the font becomes larger and red when the number is greater than 100
昆腾全双工数字无线收发芯片KT1605/KT1606/KT1607/KT1608适用对讲机方案
OMNeT学习之新建工程
Node access to Alipay open platform sandbox to achieve payment function
Use case execution of robot framework
NVIDIA显卡驱动报错
随机推荐
Detailed explanation of UWA pipeline function | visual configuration automatic test
Cartoon: what are IAAs, PAAS, SaaS?
Dlib of face recognition framework
正则过滤内网地址和网段
Loading order of logback configuration file
Public variables of robotframework
各大框架都在使用的Unsafe类,到底有多神奇?
安装及管理程序
5分钟NLP:Text-To-Text Transfer Transformer (T5)统一的文本到文本任务模型
File system read and write performance test practice
How to build tiktok user trust and drive fan growth
logback的配置文件加载顺序
English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
Use if else to judge in sail software - use the title condition to judge
Set the color change of interlaced lines in cells in the sail software and the font becomes larger and red when the number is greater than 100
SQL database
Sail soft segmentation solution: take only one character (required field) of a string
Path environment variable
欣旺达:HEV和BEV超快充拳头产品大规模出货
PyTorch:train模式与eval模式的那些坑