I have a custom quiesce script in my linux virtual machine.
The scripts are /usr/sbin/pre-freeze-script and /usr/sbin/post-thaw-script.
The pre-freeze-script quiesces the DB and touches a file ( say /etc/vm.bkp) and the post-thaw-script frees the DB quiesce and removes the file.
The logic being that if the file /etc/vm.bkp is present then this indicates that the machine has been restored from vDR backup.
The issue I face here is that I can see that the files are being created and deleted , but when I restore the backup from vDR the files are missing.
Thanks in advance for the help.
Update:
----------------
The issue is resolved now but have more question.
I had to add a sleep to ensure that the file gets created in the snapshot.
When I call touch in pre-freeze-script, and did not remove it in post thaw-script, the file was not found in the snapshot
But a sleep of 30 seconds ensured that the file was created and present in the snapshot.
Any idea why a sleep would be necessary in pre freeze script when ideally it should have just worked?
Update 2:
----------
Found an answer, apparently linux buffers io so as to avoid repeated disk access. Since we are creating a snapshot, the delay in write causes the files to be missed in the snapshot. Calling "sync" command forced the kernel to write the buffered io to disk and I was able to get the file to be created before the disk snapshot was taken.