Yeah, this one is not going to be cut and dry. In theory, you could enable snapshot caching (disabled by default) and use the snapshot dates as the precursor. The challenge here is that you would need to create a windows scheduled task to execute a workflow via PoSH using the REST interface ( I posted a simple script a few days ago on doing this). The workflow would age out snapshots based on a pre-set time stamp. Now the real challenge would be on figuring out a way to not age out EVERYTHING. There are a couple of methods that oyu can follow.
- Leverage the playground database to track volume names and retentions
- Add a user input for the snapshot age and the volume and then when you call the workflow, pass those variables for aging (this would require a CSV of some sort to run the process.
The easiest solution.... SnapCreator. Leverage the configuration to set the individual retention policies and then execute a single workflow against the configuration to age out. I assume that since you are looking for a different route that you are likely trying to perform a one time snapshot and then remove it after a certain period. If that is the case, then you might be able to create the snapshot with a specific naming convention that will allow your outside workflow to find the volumes with a certain naming convention. Again, retention for multi-use would be tricky.
Jeremy Goodrum, NetApp