Backup Script, Stored Procedure check
I'm writing a backup stored procedure to work hand in hand with a shell script:
1) Launch shell script
2) Shell script forks mysql command which executes stored procedure
3) Stored procedure flushes cache and sets database read only
3) Shell script pauses then attempts to copy mysql data files
4) mysql stored procedure waits in loop for signal from the OS copy to notify it's done copying
5) mysql stored procedure exits loop and unlocks database as readwrite
The issue I'm having is trying to check from the stored procedure loop, read a flag from the shell. I was thinking if mysql can read environment variables, I can set them to new values within the shell script, when the value changes, we have a signal. Either that or if mysql could see if a file exists, I can do a "touch" at the end of the shell copy to create a file which mysql will see, signaling to exit the stored procedure wait loop.
The reason I'm posting this is I don't see a way for mysql to see a file or environment variable value. Is there any way to signal the stored procedure that the shell copy is done?
Thank you in advance.
Gary
Subject
Views
Written By
Posted
Backup Script, Stored Procedure check
1203
June 26, 2018 06:19PM
506
June 27, 2018 07:45AM
505
June 27, 2018 11:07AM
456
June 27, 2018 02:28PM
531
June 27, 2018 02:46PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.