Bug 23346

Summary: Add without-db-name parameter to koha-dump
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Command-line UtilitiesAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize, robin
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15664
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement is the first step in allowing a koha database dump file to be restored into another koha instance. One can now pass the `--without-db-name` option to `koha-dump` to attain a zipped sql dump with no longer contains the `CREATE DATABASE` and `USE` statements within the restore file.
Version(s) released in:
19.11.00
Attachments: Bug 23346: Add without-db-name parameter to koha-dump
Bug 23346: Add without-db-name parameter to koha-dump
Bug 23346: Add without-db-name parameter to koha-dump

Description Marcel de Rooy 2019-07-19 10:23:52 UTC
See also bug 15664
Comment 1 Marcel de Rooy 2019-07-19 10:28:54 UTC
Created attachment 91628 [details] [review]
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>
Comment 2 Kyle M Hall 2019-09-06 10:42:11 UTC
Created attachment 92629 [details] [review]
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>
Comment 3 Martin Renvoize 2019-10-18 12:52:08 UTC
Created attachment 94410 [details] [review]
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>
Comment 4 Martin Renvoize 2019-10-21 09:04:39 UTC
Nice work!

Pushed to master for 19.11.00