When it is required to eject a tape from a standalone drive at the end of duplication/datacopy job, using the Post Script feature on the job will cause the eject script to be executed at the end of the Phase 1 backup and not at the end of the Phase 2.
How can one automate the tape unload at the end of the phase 2 duplication?
The use of pre/post script feature only applies to the main job not to the secondary phase.
To make sure the nvdeviceeject script run at the end of the phase 2 duplication job, you will have to raise and event at the end of the job.
Example:
1. copy the nvdeviceeject script to "C:\Program Files (x86)\Quest Software\NetVault Backup\scripts\global" or "/usr/netvault/scripts/global"
2. On the job's Advanced Options section click Events
3. In the field called Raise event if job -> Is successful : input a name to give to your event, e.g. eject_tape
Repeat for Raise event if job -> Has warnings or Failure if required, however ensure the syntax is exactly the same each time (case sensitive) as this same event name will be used to define the event later.
4. Save your job without submitting it
5. Now open the Configure Notifications link > go to the User Defined pull-down list where the event will be listed.
6. Open the event and find the ejct script, copied earlier to the global folder.
7. Select the script so each time this event is called from a job, the corresponding script is run.
8. At this point it is necessary to populate the Extra environment variables field or else you will receive an error prompting for it. Simply put 'None' or any character.
9. Now you can click the Save button and submit the job.
The event will be called when the Phase 2 duplication or datacopy have completed.