Updated recovery script

This commit is contained in:
Kevin Veen-Birkenbach 2023-07-09 19:42:11 +02:00
parent 5786e21c11
commit 978a8f93e3

View File

@ -34,7 +34,7 @@ fi
if [ -f "$backup_sql" ]; then if [ -f "$backup_sql" ]; then
if [ -n "$container" ] && [ -n "$mysql_root_password" ] && [ -n "$database" ]; then if [ -n "$container" ] && [ -n "$mysql_root_password" ] && [ -n "$database" ]; then
echo "recover mysql dump" echo "recover mysql dump"
cat "$backup_sql" | docker exec -i "$container" /usr/bin/mysql -u root --password="$mysql_root_password" "$database" cat "$backup_sql" | docker exec -i "$container" mariadb -u root --password="$mysql_root_password" "$database"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: Failed to recover mysql dump" echo "ERROR: Failed to recover mysql dump"
exit 1 exit 1