Suggestion for MYSQL backups

  • Leonard Chan
    Leonard Chan

    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:

    I hacked the flag into the [webmin root]/mysql/ 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.