I am new to SnapCreator. Currently, I am trying to implement a daily scheduled task that clones the production Postgresql database into a DEV-Testing server.
Additionally, In prior of overwriting the mounted clonevol, the task should trigger a script that check whether there are other "in-development" databases running on the DEV-Testing Server and exports these to a temporary location, in order that we can import these DBs into the newly created and mounted clonevol again.
So far I am able to create a 1:1 clone without any issue. However, I am having following issues:
- Export of "in-development" databases. This step is triggered by a "POST_CLONE_CREATE_CMD=CLONETARGET:" command, which triggers a bash script on the DEV-Testing Server to do the magic. Since this task takes some times to complete, i am facing the problem that the SnapCreator Scheduled task continues without waiting for the exit 0 from the bash script. Is there any parameter of settings that i can use to increase the timeout? or force the POST_CLONE_CREATE_CMD to wait for the completion of the bash script?
- Cleaning up of previous clonevols and nfs exportsfs entry. Is there any possibility that i can do this with in the scheduled task? of dynamic variable like %SNAP_TIME that i can use?
Finally, i just worked around this issue by just executing one CMD command. and doing all the magics in the script on the Agent. Since the task running time is random, i do not think the Sleep Command will help in my case.
In regards, of deleting CloneVols and Exportfs entrys created by the previous Clone Task. I just realized that there is a option "NTAP_CLONE_FOR_BACKUP=N", which suppose to do the trick. however, it does not.
I figured the solution by my own. In order to clean up the previous created CloneVols and Exportfs entries with SnapCreator. You will have to define an alias/reference with "NTAP_CLONE_IGROUP_MAP" to map the created Clones to this Alias.