CoW may also be used as the underlying mechanism for snapshots, such as those provided by logical volume management, file systems such as Btrfs and ZFS, and database servers such as Microsoft SQL Server. Typically, the snapshots store only the modified data, and are stored close to the main array, so they are only a weak form of incremental backup and cannot substitute for a full backup. Some systems also use a CoW technique to avoid the fuzzy backups, otherwise incurred when any file in the set of files being backed up changes during that backup.
When implementing snapshots, there are two techniques:
- The original storage is never modified. When a write request is made, it is redirected away from the original data into a new storage area. (called "Redirect-on-write" or ROW)
- When a write request is made, the data are copied into a new storage area, and then the original data are modified. (called "Copy-on-write" or CoW)
Despite their names, copy-on-write usually refers to the first technique. CoW does two data writes compared to ROW's one; it is difficult to implement efficiently and thus used infrequently.
The copy-on-write technique can be used to emulate