Files
sysPass/tests/res/scripts/dump_to_xml.sh
Rubén D 26261c0789 * [FIX] Wrong behavior when importing CSV. Thanks to @hoboristi for the feedback. Closes #1211
* [FIX] Wrong behavior when displaying passwords with scpecial characters. Thanks to @opeshm for the feedback. Closes #1207

Signed-off-by: Rubén D <nuxsmin@syspass.org>
2019-01-26 12:00:29 +01:00

24 lines
502 B
Bash
Executable File

#!/bin/bash
DB_HOST=$(docker inspect syspass-db-test --format {{.NetworkSettings.Networks.bridge.IPAddress}})
if [ -z "${DB_HOST}" ]; then
echo "Unknown host"
exit 1
fi
DB_TABLE=$1
DUMP_PATH=$2
if [ -z ${DB_TABLE} ]; then
echo "Table not set"
exit 1
fi
if [ -z ${DUMP_PATH} ]; then
echo "Dump path not set"
exit 1
fi
mysqldump --hex-blob -t -u root --password=syspass-test --host=${DB_HOST} --xml syspass-test `echo "${DB_TABLE^}"` >> ${DUMP_PATH}/syspass_${DB_TABLE}.xml