Description
Tomás Cohen Arazi (tcohen)
2015-07-14 14:42:45 UTC
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. Created attachment 41098 [details] [review] 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 Created attachment 44442 [details] [review] 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 $ ./koha-dump test ./koha-dump: 87: ./koha-dump: Syntax error: "fi" unexpected (expecting "then") $ 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 Created attachment 44674 [details] [review] Bug 14532 - fix syntax error in script Created attachment 44675 [details] [review] Bug 14532: fixed the "empty member" problem Created attachment 44676 [details] [review] Bug 14532: fixed the "empty member" problem PS: thanks to Olly Betts for knowing weird bash constuctions. Without the option, /var/lib/koha/$instance/plugins was dumped, with the option it's not. (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. 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 (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? (In reply to Mason James from comment #12) > (In reply to Tomás Cohen Arazi from comment #11) > > Created attachment 47117 [details] [review] [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. Created attachment 47307 [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 Edit: Fixed a weird quoting problem. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 47348 [details] [review] 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 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 47349 [details] [review] Bug 14532 - fix syntax error in script Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 47350 [details] [review] Bug 14532: fixed the "empty member" problem PS: thanks to Olly Betts for knowing weird bash constuctions. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 47351 [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 Edit: Fixed a weird quoting problem. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> I guess title should be 'should' - not shouldn or shouldn't? Changing it, please change back if wrong! Pushed to Master - Should be in the May 2016 Release. thanks! |