[Bug 14532] New: koha-dump shouldn't back backup Zebra indexes by default
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Bug ID: 14532 Summary: koha-dump shouldn't back backup Zebra indexes by default Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz For regular use, it is not that important to save indexes every time the backup utility is run. We should add an option switch (like --indexes) so it needs to be explicitly requested. It would mean a one-line change on the cron file for people really interested. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #1 from Robin Sheat <robin@catalyst.net.nz> --- I'm OK with that. The principle of backing up the indices is that it means a restore will have you up and running in next to no time. But making it optional is fine. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 41098 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41098&action=edit Bug 14532: Add --include-indexes switch to koha-dump This patch changes the default behaviour of koha-dump to make the inclusion of Zebra indexes on the dump optional. It does so by introducing a new option switch that allows to have the previous behaviour in place. To test: - Run $ koha-dump your_instance - Save a copy of the dump files - Apply the patch / extract the koha-dump script - Run the new one: $ koha-dump --include-indexes your_instance (you can use -i too) => SUCCESS: Verify the contents of the dump are the same (i.e. it includes /var/lib/koha/your_instance) - Run $ koha-dump your_instance => SUCCESS: The dump does not contain stuff from /var/lib/koha/your_instance - Go through the rest of the new option switches -h | --help -q | --quiet => SUCCESS: They work as expected. - Sign off :-D Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Assignee|gmcharlt@gmail.com |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 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=14532 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41098|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 44442 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44442&action=edit Bug 14532: Add --exclude-indexes switch to koha-dump This patch changes the default behaviour of koha-dump to make the inclusion of Zebra indexes on the dump optional. It does so by introducing a new option switch that allows to have the previous behaviour in place. To test: - Run $ koha-dump your_instance - Save a copy of the dump files - Apply the patch / extract the koha-dump script - Run the new one: $ koha-dump your_instance => SUCCESS: Verify the contents of the dump are the same (i.e. it includes /var/lib/koha/your_instance) - Run with the new switch: $ koha-dump --exclude-indexes your_instance => SUCCESS: The dump does not contain stuff from /var/lib/koha/your_instance - Go through the rest of the new option switches -h | --help -q | --quiet => SUCCESS: They work as expected. - Sign off :-D Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|koha-dump shouldn't back |koha-dump shouldn provide a |backup Zebra indexes by |way to exclude Zebra |default |indexes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #4 from Robin Sheat <robin@catalyst.net.nz> --- $ ./koha-dump test ./koha-dump: 87: ./koha-dump: Syntax error: "fi" unexpected (expecting "then") -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- $ sudo ./koha-dump --exclude-indexes test Dumping Koha site test: * DB to /var/spool/koha/test/test-2015-11-10.sql.gz * configs, logs to /var/spool/koha/test/test-2015-11-10.tar.gz tar: Substituting `.' for empty member name tar: : Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #6 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 44674 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44674&action=edit Bug 14532 - fix syntax error in script -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #7 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 44675 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44675&action=edit Bug 14532: fixed the "empty member" problem -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44675|0 |1 is obsolete| | --- Comment #8 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 44676 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44676&action=edit Bug 14532: fixed the "empty member" problem PS: thanks to Olly Betts for knowing weird bash constuctions. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Without the option, /var/lib/koha/$instance/plugins was dumped, with the option it's not. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #10 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Jonathan Druart from comment #9)
Without the option, /var/lib/koha/$instance/plugins was dumped, with the option it's not.
Good point! Can we just do excludes on tar? That'd be safer. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 47117 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47117&action=edit Bug 14532: (followup) Use tar's --exclude for simplicity This patch creates an --exclude definition for the tar command so it is easier to stack excluded stuff. It does so for the authority and biblio indexes if --exclude-indexes is passed. A side effect from this, is that uploads and plugins are still backed up, as Jonathan noted. Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47117|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #12 from Mason James <mtj@kohaaloha.com> --- (In reply to Tomás Cohen Arazi from comment #11)
Created attachment 47117 [details] [review] Bug 14532: (followup) Use tar's --exclude for simplicity
This patch creates an --exclude definition for the tar command so it is easier to stack excluded stuff. It does so for the authority and biblio indexes if --exclude-indexes is passed.
A side effect from this, is that uploads and plugins are still backed up, as Jonathan noted.
Regards
Hi folks, can this be switched to 'sign-off' now? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Mason James from comment #12)
(In reply to Tomás Cohen Arazi from comment #11)
Created attachment 47117 [details] [review] [review] Bug 14532: (followup) Use tar's --exclude for simplicity
This patch creates an --exclude definition for the tar command so it is easier to stack excluded stuff. It does so for the authority and biblio indexes if --exclude-indexes is passed.
A side effect from this, is that uploads and plugins are still backed up, as Jonathan noted.
Regards
Hi folks, can this be switched to 'sign-off' now?
Mason, when I was double-checking my followup, I figured it was not excluding things (using the same construct that worked on command-line), so i obsoleted it to avoid confusion, because I was leaving the office and wasn't sure when I was getting back to this. It is probably some typo from me, just didn't have the time that day. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14532 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 47307 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47307&action=edit Bug 14532: (followup) Use tar's --exclude for simplicity This patch creates an --exclude definition for the tar command so it is easier to stack excluded stuff. It does so for the authority and biblio indexes if --exclude-indexes is passed. A side effect from this, is that uploads and plugins are still backed up, as Jonathan noted. Regards Edit: Fixed a weird quoting problem. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org