Knowledgebase

Find frequently asked questions and setup guides by searching or by browsing the categories.

What a Snapshot Is

A snapshot records the state of a virtual server's disk at one moment. The storage system does not copy the whole disk; it freezes the current blocks and writes later changes separately. That is why a snapshot takes seconds, and why rolling back to it is just as fast.

The price of that speed: a snapshot lives on the same storage as the server and depends on it. If that storage fails, the snapshot is lost with it.

What a Backup Is

A backup is a complete, separate copy of the data: an image of the whole server, or selected files and databases. It is stored on different hardware, ideally in a different place, and can be restored to a new server if the original no longer exists. Creating and restoring it takes longer, because the data really is copied.

Side by Side

SnapshotBackup
What it storesThe disk state at one moment, as changes relative to the live diskA full, independent copy
Where it livesOn the same storage system as the serverOn separate storage
Time to createSecondsMinutes to hours, depending on size
Time to restoreVery shortLonger
Protects againstA failed update, a bad configuration change, an accidental deletion noticed quicklyHardware failure, a compromised server, mistakes noticed late
Kept forHours to daysWeeks to months, in several versions
Restores single filesUsually no: the whole disk goes backOften yes, depending on the backup type

When to Use a Snapshot

  • Before a system upgrade or a kernel update.
  • Before changing a control panel, a database version, or an application.
  • Before trying something you may want to undo within the hour.

Take it, make the change, test, and delete the snapshot once you are sure. Old snapshots grow as the disk changes and should not be kept as a long-term copy.

When to Use a Backup

  • As the regular, scheduled protection for anything you cannot recreate.
  • To recover from a problem discovered days or weeks later.
  • To move a server to another location or provider.
  • To meet a retention rule that asks for copies over time.

Why You Need Both

They answer different questions. A snapshot answers "can I undo what I just did?" A backup answers "can I get everything back if this server is gone?" A common rule for the second is 3-2-1: three copies of the data, on two kinds of storage, one of them in another location.

Two more points apply to both:

  • Databases: a snapshot or image taken while a database is writing may capture it mid-transaction. A database's own dump tool gives a clean, consistent copy; use it in addition.
  • Test the restore: a backup that has never been restored is a hope, not a backup. Restore one to a test server from time to time.

Before a risky change on a server, a snapshot plus a quick look at free space saves the most trouble: see how to check disk space in Linux.

Was this answer helpful?
Loading...