1. A method, comprising: processing a request to write to a source file in a storage system; determining whether a retention rule is provided for the source file; in response to determining that one retention rule is provided for the source file, generating a versioned file name, wherein a versioned file comprises the source file at a point-in-time; transmitting a command to a file system to copy the source file data to a versioned file having the generated versioned file name; adding the generated versioned file name to a retention index file; and processing the retention index file to determine whether to purge versioned files according to the retention rule provided for the source file.