Ok, not really familiar with that software, but:
- It is a shell script, so trivial (in theory) to edit. Of course, its a ~2200 line shell script.
- I think --lock-tables is coming from --opt, which is specified (from a very quick glance) at the top of the
parse_configuration function. You could add
- It uses the mysql utilities, so you may also be able to add it in your
.my.cnf in the normal way.
- You're not using InnoDB, but are using MyISAM, so you don't have transactions. So you can't use
- You thus need to lock to ensure consistency. Even with locking, its not guaranteed (just more likely). But it is just as much as you are guaranteed in normal operation. Consider InnoDB, seriously (but please read the docs, and research first, and test, to make sure it won't break your app).
- If you disable locking, you may have:
- Start backup
- Backup table A.
- Delete a record from A, and also the child record in B.
- Backup table B.
- Your backup now contains a record in A that points to a nonexistent record in B. In other words, its not consistent.
- There are more-widely-used MySQL backup solutions. Maybe you should switch to one of them. Its easier to find help with software that more people use (and it also tends to be better tested).
- You may think you have a backup, but you don't until you've actually done a successful restore, preferably from bare metal (freshly formatted hard disk). Ideally, you do this routinely, and preferably automate it. This isn't specific to MySQL, it applies to all backups.
There is a solution (besides switching to InnoDB): you can perform your backup on a slave server. It doesn't matter if you lock all tables, or
SLAVE STOP SQL_THREAD during the backup, because it won't matter to the primary. This is the no-downtime solution. You should have this server anyway, as a warm/hot standby in case the primary fails.
There is another solution, which minimizes downtime: Put the database on a LVM volume, do a
FLUSH TABLES WITH READ LOCK, take a LVM snapshot, and then release your read lock (disconnect will do this). You can then do a backup from the snapshot. This is the "I can't afford another machine" solution.