Snapshot (computer storage)

From Wikipedia, the free encyclopedia

In computer file systems, a snapshot is a copy of a set of files and directories as they were at a particular point in the past. Snapshots are useful for avoiding version skew when backing up volatile data sets, such as tables in a busy database or the folder store of a busy mail server.

Some file systems, such as WAFL, fossil for Plan 9 from Bell Labs or ODS-5, internally track old versions of files and make snapshots available through a special namespace. Others, like NTFS or UFS2, provide an operating system API for accessing file histories.

Some Unix systems (including Linux and HP-UX) may also have snapshot-capable logical volume managers. These implement copy-on-write on entire block devices by copying changed blocks—just before they are to be overwritten—to other storage, thus preserving a self-consistent past image of the block device. Filesystems on this image can later be mounted as if it were on read-only media. Block-level snapshotting is almost always less space-efficient than direct file system support for snapshots. A notable exception is ZFS, where snapshots are an integral component of the file system.

Read-write snapshots are sometimes called branching snapshots, because they implicitly create diverging versions of their data. In ZFS, they are called "clones".

Shadow paging and write ahead logging are similar snapshot-like mechanisms used internally by many databases to implement transactions.

The concept of a snapshot can also be applied to data structures held only in memory, for example in the implementation of software transactional memory. A "version" of a persistent data structure is effectively a snapshot.

Some backup software provide this service as a separated option. For example, in Backup Exec, it is called Open File Option (OFO).

Microsoft provided a similar service in system level, called Volume Snapshot Service (VSS) in Windows XP and Windows Server 2003. It is also included in Windows Vista as Shadow Copy.