Browse Source

Bug 30511: Don't lock up entire database while running koha-dump

Test plan:
1. Apply the patch
2. Restart services
3. Run koha-dump
4. Confirm the .sql.gz and .tar.gz files are generated successfully

Sponsored-by: Catalyst IT

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
master
Alex Buckley 1 month ago
committed by Fridolin Somers
parent
commit
da93be46ff
  1. 4
      debian/scripts/koha-dump

4
debian/scripts/koha-dump

@ -79,13 +79,13 @@ dump_instance()
then
schemadump="$backupdir/$name-schema-$date.sql"
[ "$quiet" = "no" ] && echo "* schema to $schemadump"
mysqldump $dbflag -d --host="$mysqlhost" \
mysqldump $dbflag -d --host="$mysqlhost" --single-transaction \
--user="$mysqluser" --password="$mysqlpass" "$mysqldb" | sed --expression='s/ AUTO_INCREMENT=[0-9]\+//' > "$schemadump"
chown "root:$name-koha" "$schemadump"
chmod g+r "$schemadump"
else
[ "$quiet" = "no" ] && echo "* DB to $dbdump"
mysqldump $dbflag --host="$mysqlhost" \
mysqldump $dbflag --host="$mysqlhost" --single-transaction \
--user="$mysqluser" --password="$mysqlpass" "$mysqldb" |
gzip > "$dbdump"
chown "root:$name-koha" "$dbdump"

Loading…
Cancel
Save