2019-01-17 08:26:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-03-27 10:31:36 +00:00
|
|
|
[ -z "${MYSQL_PASSWORD}" ] && [ -n "${MYSQL_PASSWORD_FILE}" ] && MYSQL_PASSWORD=$(cat "${MYSQL_PASSWORD_FILE}" | tr -d '\n')
|
|
|
|
|
2019-01-17 08:26:51 +00:00
|
|
|
while true
|
|
|
|
do
|
|
|
|
sleep 360
|
|
|
|
mysqldump -h "${MYSQL_HOST}" -u "${MYSQL_USER}" --password="${MYSQL_PASSWORD}" "${MYSQL_DATABASE}" | gzip > /var/lib/fic/backups/db-$(date +%Y%m%d%H%M).sql.gz
|
|
|
|
done
|