MySQL转储限制? MySQL整体数据库大小限制? [英] MySQL Dump Limit? MySQL overall database size limit?

查看:123
本文介绍了MySQL转储限制? MySQL整体数据库大小限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

客户只有大约1000行数据(当然是最新的),只是在其中一个表中丢失了.进行一些取证时,我发现该表的所有其他行中的"last_updated_date"也都设置为与删除操作大致相同的时间.这不是他们较大的表之一.

Client just had ~1000 rows of data (most recent, of course), just go missing in one of their tables. Doing some forensics, I found that the "last_updated_date" in all of their other rows of said table was also set to roughly the same time as the deletion occurred. This is not one of their larger tables.

其他一些奇怪的地方是,上周的mysqldumps exact 都是相同的大小-10375605093字节.以前的转储每个增加了约0.5GB. MySQL Dump命令是标准的:

Some other oddities are that the mysqldumps for the last week are all exact same size -- 10375605093 Bytes. Previous dumps grew by about .5GB each. MySQL Dump command is standard:

/path/to/mysqldump -S /path/to/mysqld2.sock --lock-all-tables -u username -ppassword database > /path-to-backup/$(date +%Y%m%d)_live_data.mysqldump

框上的

df -h显示每个目录中足够的空间(至少50%).

df -h on the box shows plenty of space (at least 50%) in every directory.

数据丢失加上它们的转储大小没有增加的事实,令我担心我们会以某种方式达到MySQL中的硬编码限制,(上帝,我希望我错了),数据正在损坏.有人听说过这样的话吗?我们如何解释mysqldump的大小?

The data loss combined with the fact that their dumps are not increasing in size has me worried that somehow we're hitting some hardcoded limit in MySQL and (God I hope I'm wrong), data is getting corrupted. Anyone ever heard of anything like this? How can we explain the mysqldump sizes?

推荐答案

50%的可用空间对您进行多个多gig转储并且中途耗尽空间的意义不大.除非您将二进制数据存储在转储中,否则它们是非常可压缩的,因此我建议在输出到文件之前通过gzip对mysqldump的输出进行管道传输.

50% free space doesn't mean much if you're doing multiple multi-gig dumps and run out of space halfway. Unless you're storing binary data in your dumps, they are quite compressible, so I'd suggest piping mysqldump's output through gzip before outputting to a file:

mysqldump .... | gzip -9 > /path_to_backup/....

MySQL本身没有任何限制,例如"X演出后就不再使用",但是它所运行的平台有一定的限制,

MySQL itself doesn't have any arbitrary limits that say "no more after X gigs", but there are limits imposed by the platform it's running on, detailed here.

这篇关于MySQL转储限制? MySQL整体数据库大小限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆