Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,mysql8.0 数据恢复有问题 #23

Open
knight-xiaolu2023 opened this issue Jun 16, 2024 · 4 comments
Open

你好,mysql8.0 数据恢复有问题 #23

knight-xiaolu2023 opened this issue Jun 16, 2024 · 4 comments

Comments

@knight-xiaolu2023
Copy link

执行命令:
python3 main.py /opt/user.ibd --debug --complete-insert --sql --delete
没有任何数据但是把--delete去掉后 可以恢复数据,但是我其实是使用delete from user 直接删除的。

@knight-xiaolu2023
Copy link
Author

image
好像又不行了,试了下加不加delete都没有数据

@ddcw
Copy link
Owner

ddcw commented Jun 17, 2024

你删除数据之后, mysql不一定马上就刷盘(数据可能还在内存中), 所以磁盘上有可能还是 未删除的 的状态. (为了更好的利用IO)
一个简单的验证方法: 重启 然后再次解析. (当然被标记为delete的数据行有可能会被清除掉)

执行命令: python3 main.py /opt/user.ibd --debug --complete-insert --sql --delete 没有任何数据但是把--delete去掉后 可以恢复数据,但是我其实是使用delete from user 直接删除的。

@ddcw
Copy link
Owner

ddcw commented Jun 17, 2024

所以 备份开启binlog更重要(redo不要关), 本工具只是万不得已才使用的.

@knight-xiaolu2023
Copy link
Author

我昨天猜测也是可能是异步的,但是等了5分钟还是没数据。你这个工具很不错 。上次我把测试环境数据误删了就是用你这个恢复的,感谢哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants