Bugzilla – Attachment 94410 Details for
Bug 23346
Add without-db-name parameter to koha-dump
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23346: Add without-db-name parameter to koha-dump
Bug-23346-Add-without-db-name-parameter-to-koha-du.patch (text/plain), 2.08 KB, created by
Martin Renvoize (ashimema)
on 2019-10-18 12:52:08 UTC
(
hide
)
Description:
Bug 23346: Add without-db-name parameter to koha-dump
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-18 12:52:08 UTC
Size:
2.08 KB
patch
obsolete
>From 5c59273708063bda24b9e7995b2b1ecb4b113114 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 19 Jul 2019 10:24:01 +0000 >Subject: [PATCH] Bug 23346: Add without-db-name parameter to koha-dump > >Test plan: >Run koha-dump [yourdb]. Rename the files in var/spool/koha/[yourdb] >Run koha-dump --without-db-name [yourdb] >Run a diff between the unzipped sql files. The last dump should not >contain a CREATE DATABASE and USE statement. See BZ 15664 c4. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > debian/scripts/koha-dump | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump >index 3749472127..707a8dfe05 100755 >--- a/debian/scripts/koha-dump >+++ b/debian/scripts/koha-dump >@@ -47,6 +47,7 @@ $scriptname -h|--help > --quiet|-q Make the script avoid printing to STDOUT > (useful for calling from another scripts). > --help|-h Display this help message >+ --without-db-name Do not include database name > > EOF > } >@@ -69,7 +70,9 @@ dump_instance() > [ -z "$backupdir" ] && backupdir="/var/spool/koha/$name" > dbdump="$backupdir/$name-$date.sql.gz" > [ "$quiet" = "no" ] && echo "* DB to $dbdump" >- mysqldump --databases --host="$mysqlhost" \ >+ dbflag="--databases" >+ [ "$without_db_name" = "yes" ] && dbflag="" >+ mysqldump $dbflag --host="$mysqlhost" \ > --user="$mysqluser" --password="$mysqlpass" "$mysqldb" | > gzip > "$dbdump" > chown "root:$name-koha" "$dbdump" >@@ -99,6 +102,7 @@ dump_instance() > # Default values > quiet="no" > exclude_indexes="no" >+without_db_name="no" > > while [ $# -gt 0 ]; do > >@@ -106,6 +110,9 @@ while [ $# -gt 0 ]; do > --exclude-indexes) > exclude_indexes="yes" > shift ;; >+ --without-db-name) >+ without_db_name="yes" >+ shift ;; > -h|--help) > usage ; exit 0 ;; > -q|--quiet) >-- >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 23346
:
91628
|
92629
| 94410