A versioning file system is a computer software component of a larger file system that preserves files as they are modified so the file can be viewed or restored to a previous state. Under a versioning file system, any file created will have all modifications made to its data stored somewhere in the file system so the file data can be reconstructed to represent its accurate state at any point in time since its creation. While the end result of using versioning in a file system is similar to creating a backup of files in the file system, it is not considered the same because the various versions of the files are stored within the same file system, usually in the same volume as the file being versioned. The mechanisms used to implement a versioning file system can vary greatly, but they generally include either saving an entire file periodically to create a version, or maintaining a log for each file in which only the modifications are saved so the file can be procedurally reconstructed as needed. One of the benefits of a versioning file system when used in a development or a collaborative environment is that changes can be both tracked and completely undone.
The implementation of a versioning file system can vary greatly. A few file systems implement versioning within their own framework, but versioning more often is added separately, creating what is known as a stackable versioning file system, in which the versioning abilities work on top of another type of file system. A file system occasionally will mount a separate logical disk to store the versioning information, while other times the information is written to files stored in the same logical volume as the actual data files.
On a system level, a versioning file system can take several approaches to storing version information. A simple method is known as copy on write, in which the versioning system captures system file write events and creates a copy of the file to preserve the previous version. This is effective but can use a large amount of storage over time.
Another way to implement versioning within a file system is to track modifications to a file by only storing the changes. This method essentially creates a log that shows only what information was added, changed or deleted from a file. Only recording changes can be very efficient from a storage perspective but requires processing power to re-assemble a file by basically walking through all the changes that were made to arrive at the snapshot the user is requesting.
A versioning file system is particularly useful in a collaborative development environment. For software development, it can be a valuable way to remove or roll back changes when problems arise after an update. Other collaborative environments might allow multiple users to modify documents, so versioning can allow a document to be partially restored should several changes need to be removed. In network administration, versioning helps to mitigate long-term damage from malicious software or hackers that might attempt to subtly vandalize files.