I recently created a patch for bug 12374 'Add koha-mqsqldump script, analagous to koha-mysql'.

This prompted discussion in the ticket, as well as in IRC; Katrin requested a wider discussion:

I'd like to get some more opinions on this as both Magnus and Liz have left notes that this might be better as options for koha-mysql instead of having a completely separate new script.
Could you bring this up on the mailing list/meeting/IRC for some more comments, please?

Here are Magnus' notes on the subject:

We already have the koha-dump script, which creates two files, one mysqldump and one .tar.gz file containing some config and log files, in the /var/spool/koha/<instancename> dir. Perhaps it could be an option to extend this script with a couple more options, to make it possible to:
- not dump the configs and logs
- place the mysqldump in a given dir

And 

Liz Rae's notes on the ticket:

As noted in IRC, I don't like this solution for a number of reasons. 
We already have koha-dump, it's my feeling we should build in the option to use mysqldump parameters into that instead of having Yet Another Koha-* script to maintain and document.

 As well as IRC:

21:33 wizzyrea barton doesn't koha-dump do the same thing
21:33 it is the bones behind koha-run-backups
...
21:34 wizzyrea I don't like it. Should add the functionality to koha-mysql, as an option
...
21:51 wizzyrea if we were to go db agnostic, that would be problematic.

 We'll take those as the objections to the addition of koha-mysqldump -- here are my arguments for it:

  1. If we add to koha-dump or koha-mysql, we require a means of dis-ambuguating arguments controlling the script vs. arguments passed through to mysql / mysqldump.
  2. koha-dump is well suited to backing up the entire site, but would require command line options to disable the dump of configs and the full database. This compounds point 1.
  3. We already have the koha-mysql  koha-mysqlcheck wrappers around mysql and mysqlcheck respectively -- koha-mysqldump seems like a logical extension -- users might logically expect koha-mysqldump to exist, and would not be surprised to find it among the existing tools.
  4. The overhead of supporting this script is minimal -- It's already written and documented, and it's only minimally different from koha-mysql, which has been stable for years.
  5. It follows the Unix philosophy of 'Do one thing well'.
Liz's point that koha-mysqldump is not database agnostic is valid -- but then neither are koha-mysql or koha-mysqlcheck.

The reality is that koha-dump should probably be implemented as a wrapper around a  tool like koha-mysqldump, which should in turn be thin wrapper around a database agnostic tool that knows how to supply database connection arguments to mysql, mysqldump, postgreSQL clients, etc... But it's not. So failing that, my koha-mysqldump patch fills a currently un-met need -- I routinely copy koha-mysql into my home directory on remote machines and hack it into koha-mysqldump when I need to back up single tables or groups of records.

Respectfully,

--Barton