replace mysqldump

This commit is contained in:
leo 2024-08-21 18:44:53 +05:00
parent c6d65a1de1
commit fc5ccc8c7b

View File

@ -45,8 +45,8 @@ if [ -f 'dump_'"$MYSQL_DB"'.sql' ]; then
fi
DB_BACKUP_FILENAME=$MYSQL_DB'_'$CURRENT_DATETIME'.tar.gz'
echo 'Exec mysqldump...'
docker exec -t $DOCKER_SERVICE_NAME mysqldump -u $MYSQL_USER -p$MARIADB_ROOT_PASSWORD $MYSQL_DB > 'dump_'"$MYSQL_DB"'.sql'
echo 'Exec mariadb-dump...'
docker exec -t $DOCKER_SERVICE_NAME mariadb-dump -u $MYSQL_USER -p$MARIADB_ROOT_PASSWORD $MYSQL_DB > 'dump_'"$MYSQL_DB"'.sql'
echo 'Pack to tar.gz...'
tar -cf - 'dump_'"$MYSQL_DB"'.sql' | gzip -9 > "$DB_BACKUP_FILENAME"