[Bug 10735] New: koha-dump not working
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Bug ID: 10735 Summary: koha-dump not working Change sponsored?: --- Product: Koha Version: 3.12 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: trebbu@googlemail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Steps to Reproduce (on Debian, installing via apt-get koha-common): (1) Use koha-run-backups on an older Koha version (I used 3.10 which has been updated from an even older installation). (2) koha-restore data and configuration from step (1) into a Koha 3.12 installation. (3) Run /usr/sbin/koha-dump. Actual Result: It says "Dumping Koha site [...]:". Nothing else happens. Expected Result: Two dump files. Workaround: Remove the "set -e" line in /usr/sbin/koha-dump Additional Information: The older configuration doesn't have a config/backupdir entry. backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' $kohaconfig )" therefore returns 1 and exits koha-dump. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #1 from Liz Rea <liz@catalyst.net.nz> --- Did you specify an instance to dump when you ran koha-dump? The correct syntax is: koha-dump instancename Just making sure. :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 --- Comment #2 from Robin Sheat <robin@catalyst.net.nz> --- The best solution would be a fallback for the backup path. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Bert Burgemeister <trebbu@googlemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |trebbu@googlemail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 --- Comment #3 from Bert Burgemeister <trebbu@googlemail.com> --- (In reply to Robin Sheat from comment #2)
The best solution would be a fallback for the backup path.
The fallback is already sort of implemented. It just doesn't work because xmlstarlet returns non-zero which kills koha-dump immediately due to its "set -e" setting. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 --- Comment #4 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Bert Burgemeister from comment #3)
The fallback is already sort of implemented. It just doesn't work because xmlstarlet returns non-zero which kills koha-dump immediately due to its "set -e" setting.
It'd be better to fix that case with some error handling (or even just '|| true' to hide it if appropriate) than turn off the error aborting script-wide, as that may cause it to try to plow on rather than die if something else goes wrong. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Fabio Tiana <fabio.tian@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fabio.tian@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 23010 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23010&action=edit Bug 10735 - prevent script aborting if backupdir undefined Older versions of Koha didn't have <backupdir>...</backupdir> defined in koha-conf.xml. The koha-dump script is aware of this, and checks to see if it's there. However, if it's not, xmlstarlet returns a non-0 error code which causes the script to abort due to running under set -e. Test plan: * Remove backupdir from koha-conf.xml * Run koha-dump, notice that it doesn't do backups * Apply patch * Run koha-dump again, notice that it does do backups -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |robin@catalyst.net.nz |ity.org | --- Comment #6 from Robin Sheat <robin@catalyst.net.nz> --- Patch applied against master, but I'd expect it to backport cleanly. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23010|0 |1 is obsolete| | --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 23700 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23700&action=edit Bug 10735 - prevent script aborting if backupdir undefined Older versions of Koha didn't have <backupdir>...</backupdir> defined in koha-conf.xml. The koha-dump script is aware of this, and checks to see if it's there. However, if it's not, xmlstarlet returns a non-0 error code which causes the script to abort due to running under set -e. Test plan: * Remove backupdir from koha-conf.xml * Run koha-dump, notice that it doesn't do backups * Apply patch * Run koha-dump again, notice that it does do backups Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> The fallback method works as described. It might be made more robust like checking for dir existence (thinking of older instances upgrades). But it certaintly belongs to another bug report. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23700|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 23784 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23784&action=edit Bug 10735 - prevent script aborting if backupdir undefined Older versions of Koha didn't have <backupdir>...</backupdir> defined in koha-conf.xml. The koha-dump script is aware of this, and checks to see if it's there. However, if it's not, xmlstarlet returns a non-0 error code which causes the script to abort due to running under set -e. Test plan: * Remove backupdir from koha-conf.xml * Run koha-dump, notice that it doesn't do backups * Apply patch * Run koha-dump again, notice that it does do backups Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> The fallback method works as described. It might be made more robust like checking for dir existence (thinking of older instances upgrades). But it certaintly belongs to another bug report. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> As Tomas said, it would be better to alert the user if the backupdir tag does not exist (or contains a nonexistent directory) in the config file. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Version|3.12 |master --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- The patch is for master and can be backported to stable branches. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Robin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolyn.somers@biblibre.co | |m --- Comment #11 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Patch pushed to 3.14.x, will be in 3.14.2. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10735 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.9. Thanks Robin! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org