Suggestion for MYSQL backups

Webmin
2007-04-14
2013-05-21
  • Leonard Chan
    Leonard Chan
    2007-04-14

    I suggest that the mysql backups have the "-q" flag added to dramatically reduce the memory required for large table backups.

    One of my databases started tossing this error during the daily virtualmin backups:

    usr/bin/mysqldump: Out of memory (Needed 8164 bytes)
    /usr/bin/mysqldump: Got error: 2008: MySQL client run out of memory when retrieving data from server

    I did a bit of research and found this blog post that suggests using the "-q" flag: http://jeremy.zawodny.com/blog/archives/000690.html

    I hacked the flag into the [webmin root]/mysql/feature-mysql.pl file and now the db backs up OK.

    My situation might be different than most.  This is my Virtuozzo based VPS and it doesn't have a "normal" swap file. Anyway, it's a small change with very few downsides and I think it should be the default setting.  If not, I'll just hack the file after every update.

    Thanks again for Webmin.  I don't know how I'd manage my VPS without it.

    LC