Bugzilla – Attachment 123254 Details for
Bug 28749
All backups behave as if --without-db-name is passed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28749: Restore the database name to Koha dumps
Bug-28749-Restore-the-database-name-to-Koha-dumps.patch (text/plain), 1.59 KB, created by
Nick Clemens (kidclamp)
on 2021-07-28 14:21:56 UTC
(
hide
)
Description:
Bug 28749: Restore the database name to Koha dumps
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-07-28 14:21:56 UTC
Size:
1.59 KB
patch
obsolete
>From bc507cbfccc6fdaa7e74bd736978fbc991de2d00 Mon Sep 17 00:00:00 2001 >From: Jason Boyer <JBoyer@equinoxOLI.org> >Date: Wed, 28 Jul 2021 14:01:25 +0000 >Subject: [PATCH] Bug 28749: Restore the database name to Koha dumps > >The line to use the --databases flag with mysqldump by default was accidentally >removed from koha-dump when the --schema-only option was added. This makes all >backups act as if koha-dump is called with the --without-db-name flag, causing >koha-restore to fail to restore the database because it's neither CREATEd or USEd. > >This patch restores that line > >To test: >1 - sudo debian/scripts/koha-dump kohadev >2 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE >3 - Notice no output >4 - Apply patch >5 - sudo debian/scripts/koha-dump kohadev >6 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE >7 - You get the line: > CREATE DATABASE /*!32312 IF NOT EXISTS*/ `koha_kohadev` /*!40100 DEFAULT CHARACTER SET latin1 */; > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > debian/scripts/koha-dump | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump >index b7a6061c65..f3a6b5aed7 100755 >--- a/debian/scripts/koha-dump >+++ b/debian/scripts/koha-dump >@@ -73,6 +73,7 @@ dump_instance() > backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' $kohaconfig || true )" > [ -z "$backupdir" ] && backupdir="/var/spool/koha/$name" > dbdump="$backupdir/$name-$date.sql.gz" >+ dbflag="--databases" > [ "$without_db_name" = "yes" ] && dbflag="" > if [ "$schema_only" = "yes" ] > then >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28749
:
123114
| 123254