2022-10-09 11:33:33 +00:00
|
|
|
#!/usr/bin/env sh
|
2020-02-03 20:06:20 +00:00
|
|
|
|
|
|
|
BACKUP_DIR="/backup/database"
|
|
|
|
|
2022-10-06 15:07:05 +00:00
|
|
|
echo "Starting to backup mysql database"
|
2020-02-03 21:48:03 +00:00
|
|
|
|
2022-10-09 12:42:33 +00:00
|
|
|
mkdir --parents $BACKUP_DIR || exit 1
|
|
|
|
mysqldump --single-transaction --host=$MYSQL_BACKUP_HOST --user=$MYSQL_BACKUP_USER --password=$MYSQL_BACKUP_PASSWORD $MYSQL_BACKUP_DATABASE > $BACKUP_DIR/$MYSQL_BACKUP_DATABASE.sqldump || exit 1
|
2020-02-03 20:06:20 +00:00
|
|
|
|
2022-10-06 15:07:05 +00:00
|
|
|
echo "Mysql database backup finished"
|