@@ -, +, @@ ---------- -- choose just this patch -- there is a koha-dump.cnf file with rw owner only perms in one of the ls runs data in it. koha-conf.xml file match, confirm your kohadev still works, and that a retest of koha-dump still works. --- debian/scripts/koha-dump | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) --- a/debian/scripts/koha-dump +++ a/debian/scripts/koha-dump @@ -68,13 +68,22 @@ 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" + dboptions="$backupdir/koha-dump.cnf" + # New each time, in case they change the username + # or password. + touch $dboptions + chmod 600 $dboptions + echo "[mysqldump]" > $dboptions + echo "host=$mysqlhost" >> $dboptions + echo "user=$mysqluser" >> $dboptions + echo "password=$mysqlpass" >> $dboptions [ "$quiet" = "no" ] && echo "* DB to $dbdump" - mysqldump --databases --host="$mysqlhost" \ - --user="$mysqluser" --password="$mysqlpass" "$mysqldb" | - gzip > "$dbdump" + mysqldump --defaults-file="$dboptions" \ + --databases "$mysqldb" | gzip > "$dbdump" + # don't leave passwords lying around on the filesystem + rm $dboptions chown "root:$name-koha" "$dbdump" chmod g+r "$dbdump" - instancefile="$name.conf" # Dump configs, logs, etc. --