This solution combines several existing tape related scripts with enriched functionality. The short list is shown in the DPMTapeUtil user guide illustration on the right. You can download the script and user guide from here, provided “as is” no rights or warranties implied.
This script is updated to also copy recovery points to disk and to copy only the latest recovery point across media to disk!
The “DPMTapeUtil.Ps1” script performs a variety of tape related functions such as; report recovery points, start inventory, mark free, erase, eject, re-catalog, rescan library, run a one-off backup and more… These functions can be used individually or in combinations, interactively on the DPM server or scheduled on multiple DPM servers. Tape selection and scheduling are controlled through simple command definitions. For instance to erase tapes that are ‘Recyclable’ every Sunday at 04:00 AM;
-tapeerase –schedule “Enable|Weekly|Sun|04:00”
This only works with tapes DPM can understand, to erase tapes with an unsupported block size, see this companion post.
Why or when would you use this?
Although the DPM UI has good multi-select features, selecting a larger collection of tapes to perform the same action through this script can be more convenient. This is particularly true with good criteria such as; commonality in displayed label or barcode, a timespan or particular state the tapes can have. For instance; all tapes in all libraries across multiple servers with expired data, or that are offsite ready, or have written less than or at least certain amount of data and so forth…
The UI does not produce raw data about recovery points or tapes that can be easily imported in Excel or other program to process further. Obviously a UI does not return information for automation. This script returns object collections you can use in your own scripts such as selected tapes, triggered jobs, created output files….
Executing multiple actions on the same set of tapes, for instance mark free, erase and eject can be cumbersome when individual steps take a long time and must complete before the next step can be executed. Such activities often also need to happen on predictable times or conditions were this script can be used to automate that. This script can schedule itself using a simplified “Task Manager” specification as shown above that creates jobs on one or more DPM servers running the desired functions.
You would typically not use this script for ad-hoc activities which are just as easily if not easier done through the UI.