Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How are snapshot backups different from traditional backups? I know that snapshot backups take a minimum of time, but I don't understand how they can do this. Can anyone explain this to me?

share|improve this question
1  
I assume you are talking about taking a snapshot of a virtual machine? You might want to specify some more detail about your platform/software –  Mark Henderson Oct 1 '09 at 0:27
    
Are you referring to incremental backups? –  Pascal Thivent Oct 1 '09 at 2:46
add comment

4 Answers

up vote 7 down vote accepted

Snapshots aren't really backups per se. They're simply using pointers to point to another set of blocks on the drive.

For example, let's say you have a file called, "ServerFault.doc" and it takes up blocks A, B, and C on the hard drive. When you take a snapshot, Snap.0 (my name for the first snapshot) points at blocks A, B, and C. It simply makes a copy of the pointer, but not the data.

Now let's say you alter the file. When you save the file, instead of overwriting those existing blocks, the newly altered "ServerFault.doc" takes up blocks A, B, and D (presuming block D contains the changes to the file) and now your file pointer points to A, B, and D (leaving C unaltered). If you take another snapshot, Snap.1 now points to A, B, and D. If you "restore" Snap.0, it simply changes to the pointer to look at those blocks.

Depending on the file system, this process can be very slick. However, it's not a backup in the sense that if the drive fails, you'll still lose your data. The data still must be copied off to another source to be protected.

share|improve this answer
add comment

I think wikipedia can probably explain this in greater detail than I can do here. But basically when you create a snapshot the only thing that's happening is some metadata changes to create the snapshot. This is done pretty much instantly. From that point on any changes to the file system get associated with the current live file system leaving the disk structures associated with the snapshot untouched. This is done using a technique called copy on write. Which can also be explained better on wikipedia. Hope that helps shed some light on it.

Your question is to how this differs from traditional backup. Traditional backups dump the whole file system, or portion of it to tape or other disks. This takes time, bandwidth, etc. Where snapshots are done on the same volume instantly.

Snapshots aren't a substitute for backups on their own. They are a tool that can be part of a backup strategy. But since they are on the same physical disks and SAN/NAS/Server as the live file system this is still a single point of failure. When coupled with data replication or traditional backup to tape snapshots are a useful backup tool. They are also useful keeping point in time backups in case a file is deleted. Being on the same volume restoring these files from a snapshot is pretty quick.

share|improve this answer
add comment

The primary feature of snapshots is copy on write. When take a snapshot your system will not make changes to existing files/blocks. When a write needs to be made a copy of that block/file is made and the write is redirected to an alternate location.

share|improve this answer
add comment

The term "snapshot" doesn't really apply to any particular method or system. It is a blanket term to cover a principle, rather than a technology. e.g. I take periodic snapshots of my servers by imaging the drives before doing anything risky on them, such as a major software upgrade. If something goes wrong that image can be quickly restored. Some may argue that this is not a snapshot but in fact it is, as it records the state of the drive(s) at a point in time.

Other methods will take periodic snapshots of running systems, which allows recovery and/or roll-back if that is ever required. The technology used will be dependent on the running system. Windows Volume Shadow Copy is a form of snapshot technology.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.