The Replace File operation or replace file functionality replace the data object/checksum, identified by the given an ID in the bit repository with a given new data object. It may only replace the data on certain pillars if this is specified explicitly.
Replacement of a file consist of replacing a full copy or a checksum (depending on the pillar type) with another given data corresponding to given file identifier in a given service level agreement. Replacement can be used as part of re-establishment of integrity of files, where some of the replicas have been damaged - in this case only some of the replicas are replced. It can also be used to re-establishment of wrongly putted data objects - in this case all replicas are replaced.
An alternative to use of replacement using existing operations GetFile (object to replace another) DeleteFile (object to be replaced) and PutFile (object found via GetFile). This alternative can however be inefficient, as well as give challenges in regard of ensuring that the whole process is carried out. Otherwise the data is at risk of being lost. A 'regret period' for the replaced object is not part of the protocol, but as for Delete File, we assume a regret period in which it is possible to perform a manual roll-back is part of the SLA.
User stories involving Replace File operation.
- Replace all copies of a data object including checksum copies — The user story is that a data object has been erroneous inserted in the bitarchive for a certain identifier.
- Replace file with full copy on one pillar as part of internal integrity processesing — The user story is that there has been found an inconsistancy as part of the integrity. As part of re-establishement of the integrity, the incorrect data object must be replaced by a correct one.
- Replace file - pillar to pillar — The user story is that we want to replace one incorrect data object from pillar X with one correct data object from pillar Y, where the transfer of the data object is made 'directly' between the two pillars.
- Replace file with checksum copy on one pillar as part of internal integrity processesing
The replacement is managed via a replace client and communication with pillars via the coordination layer through messages initiating actions and data transmission for data to replace.
- IdentifyPillarsForReplaceFile Primitive — The primitive consists of IdentifyPillarsForReplaceFileRequest and IdentifyPillarsForReplaceFileResponse.
- ReplaceFile Primitive — The primitive consists of ReplaceFileRequest, ReplaceFileProgressResponse and ReplaceFileFinalResponse.