<div dir="ltr">I recently created a patch for bug 12374 'Add koha-mqsqldump script, analagous to koha-mysql'.<div><br></div><div>This prompted discussion in the ticket, as well as in IRC; Katrin requested a wider discussion:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">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.<br>Could you bring this up on the mailing list/meeting/IRC for some more comments, please?</blockquote><div><br></div></div><div>Here are Magnus' notes on the subject:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>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:<br>- not dump the configs and logs<br>- place the mysqldump in a given dir</blockquote><div><br></div><div>And </div><div><br></div><div>Liz Rae's notes on the ticket:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">As noted in IRC, I don't like this solution for a number of reasons. <br>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.</blockquote><div><br></div><div> As well as IRC:</div></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">21:33<span class="gmail-Apple-tab-span" style="white-space:pre">   </span>wizzyrea<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>barton doesn't koha-dump do the same thing<br>21:33<span class="gmail-Apple-tab-span" style="white-space:pre">         </span>it is the bones behind koha-run-backups<br>...<br>21:34<span class="gmail-Apple-tab-span" style="white-space:pre">   </span>wizzyrea<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>I don't like it. Should add the functionality to koha-mysql, as an option<br>...<br>21:51<span class="gmail-Apple-tab-span" style="white-space:pre">     </span>wizzyrea<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>if we were to go db agnostic, that would be problematic.</blockquote><div><br></div><div> We'll take those as the objections to the addition of koha-mysqldump -- here are my arguments for it:</div></div><div><br></div><div><ol><li>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.<br></li><li>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.<br></li><li>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.</li><li>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.</li><li>It follows the Unix philosophy of 'Do one thing well'.</li></ol><div>Liz's point that koha-mysqldump is not database agnostic is valid -- but then neither are koha-mysql or koha-mysqlcheck.</div></div><div><br></div><div>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.</div><div><br></div><div>Respectfully,</div><div><br></div><div>--Barton</div><div><br></div></div>