All guides
Home Glossary Snapshot
Term

Snapshot

A snapshot is a point-in-time image of a file system, database, or virtual machine state.

A snapshot is a point-in-time record of a file system, database, storage volume, or virtual machine state. Instead of duplicating every file, it captures metadata and block pointers at a specific instant. System administrators rely on snapshots to preserve a known working state before running risky software upgrades, kernel patches, or configuration changes.

How it works

Modern storage engines and hypervisors implement snapshots using Copy-on-Write (CoW) or Redirect-on-Write (RoW) mechanisms so creation finishes almost instantaneously:

  • Copy-on-Write (CoW): When a data block is about to be modified, the storage system first copies the original block to a dedicated snapshot space before writing the new data over the original location.
  • Redirect-on-Write (RoW): New writes go directly to unallocated space, while the original block remains untouched and stays indexed by the snapshot pointer table.

In cloud block storage platforms such as AWS EBS, snapshots are typically incremental. The first snapshot copies the active blocks to object storage, and subsequent snapshots save only the blocks changed since the previous capture. In virtualization environments, taking a memory-inclusive snapshot also writes the virtual machine's active RAM state to disk alongside the storage pointers.

Example

Before upgrading a production database package on a Linux server using Logical Volume Manager (LVM), an operator creates a 5 GB CoW snapshot volume to allow an immediate rollback if migrations fail:

lvcreate --size 5G --snapshot --name db_pre_upgrade /dev/vg_data/lv_postgres

If the upgrade corrupts the schema or introduces a breaking bug, the administrator stops the database service and merges the snapshot back into the original volume:

systemctl stop postgresql
lvconvert --merge /dev/vg_data/db_pre_upgrade

On cloud infrastructure, automated backup tools often take filesystem-consistent snapshots by briefly freezing disk I/O (using tools like fsfreeze) so in-flight transactions flush to disk before the pointer map is recorded.

What matters when choosing a server or hosting

When evaluating virtual private servers (VPS), dedicated storage, or managed cloud hosting, consider how the provider handles snapshot architecture and limits:

  • Storage backend and speed: NVMe-backed storage pools handle CoW and RoW pointer lookups with far lower latency penalties than spinning disks.
  • Off-host durability: Check whether snapshots stay on the same physical storage array (fast local rollback, zero protection against hardware failure) or replicate asynchronously to separate object storage.
  • Application consistency: Look for native guest agents (such as QEMU Guest Agent) that quiesce databases and flush file system buffers before capturing the state.
  • Retention and automation: Ensure the API or control panel supports scheduled snapshots and automatic pruning rules so old delta chains do not accumulate unnoticed.

Common mistakes

  • Treating snapshots as full backups: Local hypervisor or volume snapshots depend on the underlying base disk. If the primary storage array fails or becomes corrupted, the snapshot chain is lost with it.
  • Leaving snapshots active indefinitely: Keeping hypervisor delta files open for weeks or months forces the storage layer to traverse long chains of difference disks, degrading read/write I/O performance and eventually filling the datastore.
  • Snapshotting busy databases without quiescing: Capturing a running database without flushing memory buffers can produce a crash-consistent image that requires lengthy recovery or contains incomplete transactions upon restore.

FAQ

What is the difference between a snapshot and a backup?

A snapshot is a fast, local state marker tied to the original storage volume, designed for short-term rollbacks. A backup is an independent, self-contained copy stored on separate media or in another location for long-term retention and disaster recovery.

Do snapshots slow down server performance?

Creating a snapshot takes milliseconds, and a single recent snapshot adds minimal overhead. However, running multiple active snapshots or keeping a large delta file open during heavy write workloads increases disk I/O latency.

How much disk space does a snapshot use?

At creation, a snapshot consumes almost no space because it only stores pointers. Its size grows over time in proportion to how much data is modified or deleted on the source volume while the snapshot exists.

All glossary terms

Glossary

Related terms

Full glossary

New guides every week.

A digest of the best pieces on servers, VPN and self-hosted software. No ads, no spam.

1 email a weekOne-click unsubscribeRU · EN
Only slipjar.app articles, nothing else.