Prerequisite
In order to set up the Archive and Restore module, for manual archiving through web application plugins, you must first have Curator 2.0+ installed.
Workflows Needed:
Plug-in - Send to genericV3 (Soon to be V4)
Spawn - Transfer AssetV6
Spawn - Xfer TransferV5
Persistent Scheduled - Purge MediaStores
Spawn - Search Curator for Assets to Purge
Spawn - Delete File From Spinning DiscV2
Metadata Needed:
RestoreDate - Type: DateTime - Media/Audio/Image
Archived - Type: Boolean - Media/Audio/Image
ArchivePath - Type: FilePath - Media
MediaStores
SENDTOARCHIVE
<SENDTOARCHIVE>
<Path>X:\IPV\Archive</Path> - This will simply need to be the path to the Archive storage folder
<OutputProfile>Xfer Copy</OutputProfile>
<StoreType>Archive</StoreType>
<PathMetadataKey>ArchivePath</PathMetadataKey>
<AvailableMetadataKey>Archived</AvailableMetadataKey>
<FileNamePattern></FileNamePattern>
<Source>HI-RES</Source>
<Workflow>Spawn - Xfer TransferV5</Workflow>
<ApprovalRequired>False</ApprovalRequired>
<Metadatafieldselector></Metadatafieldselector>
</SENDTOARCHIVE>
RESTOREFROMARCHIVE
<RESTOREFROMARCHIVE>
<Path>Y:\IPV\MediaStore\HighRes\Restored From Archive</Path> -
<OutputProfile>Xfer Copy</OutputProfile>
<StoreType></StoreType>
<PathMetadataKey>HiResPath</PathMetadataKey>
<AvailableMetadataKey>Online</AvailableMetadataKey>
<TxDateMetadataKey>RestoreDate</TxDateMetadataKey> -
<FileNamePattern></FileNamePattern>
<Source>SENDTOARCHIVE</Source>
<Workflow>Spawn - Xfer TransferV5</Workflow>
<ApprovalRequired>False</ApprovalRequired>
<Metadatafieldselector></Metadatafieldselector>
</RESTOREFROMARCHIVE>
The above media stores will be used by the SendToDestination plugins we configure shortly, however to ensure the HiRes gets successfully purged the following will need to be added to the HI-RES media store (Different media stores can be used, however the SENDTOARCHIVE media store will need to be re-configured to match).
<PurgeSearchProcess>Spawn - Search Curator for Assets to Purge</PurgeSearchProcess> <PurgeSearchString>(hirespath_metadata_filepath:*) AND (proxyexists_metadata_boolean:true) AND (archived_metadata_boolean:true)</PurgeSearchString> <PurgeAssetTypes>media,audio</PurgeAssetTypes> <PurgeIngestRetentionDays>0</PurgeIngestRetentionDays> <PurgeRestoreRetentionDay>30</PurgeRestoreRetentionDay> <PurgeReportMetadata>asset.name,HiResPath,OnLine,ProxyExists,Analysed,Archived,asset.asset_id</PurgeReportMetadata> <!--Workflow to use to purge files from this MediaStore--> <PurgeWorkflow>Spawn - Delete File From Spinning DiscV2</PurgeWorkflow> <PurgeProcess>Spawn - Delete File From Spinning DiscV2</PurgeProcess>
Plugins
By default with ClipLink/Select versions provided with the Curator 2.0+ package, SendToDestination is a plugin found in the 'Plugins' folder of the web application. If it is not, then this will need to be installed first.
Once in place, changes will need to be made to the Curator Server configuration files for the respective web application.
Example Clip Select Location: C:\Program Files\IPV\Curator\Server\Config\w[]-u[]-win[]-m[]\WebApplications\CuratorClipSelect
In this example we will be making a two plugin setup, however both the Archive and Restore functionality could be combined into one.
In the above location, edit SendToDestination.config in a notepad editor. The following sections will need to be configured:
<PEServiceConfiguration processDefinitionName="Plug-in - Send to genericV3"/> <SendAssetToDestinationConfiguration> <Destinations> <!-- User --> <Destination name="Send To Archive" locationPath="SENDTOARCHIVE" /> </Destinations> </SendAssetToDestinationConfiguration>
NOTE: At the time of writing this, Send to genericV4 had a bug causing this process to fail. Therefore, the above may need to be changed to V4 if a fix is released.
LocationPath needs to match to the the exact name of the MediaStore created previously.
If your setup requires one plugin, simply add a second Destination name, pointing at the restore media store.
The easiest way of configuring the Restore plugin, is to make a copy of the SendToDestination.config file and rename it RestoreFromArchive.config in the same location.
As above, the config will need to look similar to the below:
<PEServiceConfiguration processDefinitionName="Plug-in - Send To GenericV3" /> <SendAssetToDestinationConfiguration> <Destinations> <Destination name="Restore From Archive" locationPath="RESTOREFROMARCHIVE"/> </Destinations> </SendAssetToDestinationConfiguration>
It is advised that the config footer is also changed to ensure the plugins are differentiated:
<PluginUIConfiguration filename="RestoreFromArchive" folder="SendToDestination" icon="RestoreFromArchive.svg" namespace="SendToDestination" contextMenuTitle="Restore From Archive" tooltip="Restore from archive" alwaysEnabled="false" hideOkCancel="false" hideHeader="false"/>
Attached are two plugin images that can be used to differentiate the plugins. Simply add these into the SendToDestination folder within plugins of the relevant web application.
icon="" can be changed within the SendToDestination.config to use the attached image.
At this stage, the plugins are configured to test out the Archive/Restore process. What should be noted is that Xfer will be simply doing a copy from one location to another, adding metadata for Archived to true and ArchivedPath to the new path. The HiRes will NOT be deleted - nor will the metadata field.
In order to set up the Hi-Res deletion, The Persistent Scheduled - Purge MediaStores will need to be started. HOWEVER, it is advised that this workflow is started as ReportOnly True. So that no files are modified, should any of the configuration be incorrect.
The way the purge works, is that the CuratorDB will be searched for any asset that has been archived and the HiRes path metadata is still present. It will then filter out any asset that has been restored in the past 30 days (From today's date, using the metadata name RestoreDate. This includes if the metadata is empty). The end goal of this process being:
- If an asset has been sent to archived for the first time, the Hi-Res will be deleted and metadata modified
- If an asset has been archived and then restored, the Hi-Res will stay online for 30 days (Or whatever the value set in the media store). This persistent process will then delete the Hi-Res and remove the metadata.
Once you are happy that only relevant files will be deleted, the Purge workflow can be started as ReportOnly False.