Azure / azure-linux-extensions

Linux Virtual Machine Extensions for Azure
Apache License 2.0
301 stars 251 forks source link

mysql backup stops database #1911

Closed tomabg closed 3 months ago

tomabg commented 3 months ago

Hi,

we have testet the "Enhanced pre-post scripts for database consistent snapshot" https://learn.microsoft.com/en-us/azure/backup/backup-azure-linux-database-consistent-enhanced-pre-post

The result is with below config that the pre script set DB to read only but post script never runs so after the backup DB is still read only.

root@SAZU001MON:~# cat /etc/azure/workload.conf
[workload]
#workload_name valid values- mysql, oracle, mariadb, postgres
workload_name = mysql
command_path = /usr/bin
credString = --defaults-extra-file=/root/orabackup.conf
#needs to be this directory: SHOW VARIABLES LIKE "secure_file_priv";
ipc_folder = /var/lib/mysql-files
timeout =
linux_user = root

root@SAZU001MON:~#
tomabg commented 3 months ago

How can i send you the logfile over?

tomabg commented 3 months ago

maybe the problem is that the /etc/azure/DefaultScripts directory is deleted before executing the database post part?

2024-04-11 12:23:22.497436 [Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0]WorkloadPatch: command to execute: sudo -u root /usr/bin/mysql --defaults-extra-file=/root/orabackup.conf -e"set @timeout=2;set @outfile=\"\\\"/var/lib/mysql-files/azbackupIPC.txt\\\"\";source /etc/azure/DefaultScripts/preMysqlMaster.sql;"
2024-04-11 12:23:24.490443 [Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0]WorkloadPatch: sql subprocess Created 5418
2024-04-11 12:23:24.494450 [Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0]WorkloadPatch: pre at server level completed

2024-04-11 12:23:29.829159 [Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0]WorkloadPatch: Removed temporary scripts folder

2024-04-11 12:23:31.200768 [Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0]workload running found with name : mysqld
tomabg commented 3 months ago

closed not db but application issue sorry