mysql 只备份一天内发生变化的表
我已经为测试环境创建了生产服务器的副本。我已经备份了我的产品数据库并将其恢复以进行测试,但我不希望每天将数据转储到测试服务器。
我是否可以识别哪些表已更改并仅转储当天插入的数据。
如果我在描述中不清楚我想做什么,请告诉我。
谢谢, 玛纳西
I have created a replica of my production server to a test environment. I hav backed up my prod db and restored it to test but i dont want data to be dumped to test server everyday.
Is it possible I can identify which tables has changed and only dump data which has been inserted for that day.
Please let me know if I am being unclear in the description what I want to do.
Thanks,
Manasi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果服务器上启用了 --log-bin 参数,则可以进行增量备份 http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html
If the --log-bin parameter is enabled on the servers, you can do incremental backups http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html
这可能不是最好的方法,但您可以只有一个“上次修改”字段,然后查看是否有任何字段是当前日期。
This probably is not the best method but you could just have a "last modified" field and look to see if any of the fields are of the current date.