VMWare Snapshots Are Not Backups!

Snapshots Dec 23, 2020

What?  That sounds like crazy talk.  I’ve always used snapshots before doing major server upgrades and changes…

Well, to explain, lets firstly breakdown what a snapshot really is.

On VMware virtual machines, a virtual disk is a .vmdk file residing on your VMware storage, aka a data store.  When a snapshot is created, the original disk is set to a read-only mode, and any new data changes are written to a temporary .vmdk delta disk, which points to the original disk.  The delta disk is the difference between the state of the virtual machine when the snapshot was taken, and the current state of the virtual disk.  The process of taking a VMware snapshot also involves the creation of two additional files: a snapshot metadata file (.vmsd) and the running state information file (.vmsn).  After a snapshot is deleted, all the changes are sewn back together into the original .vmdk file, which then returns to read-write mode.

Happy so far?  Cool.  What about a backup then?

A backup is a consistent copy of your virtual machine.  A copy that allows you to restore the virtual machine to its original state in the event of an issue.  Unlike snapshots, backups are independent of the VM, and they can easily be exported and stored elsewhere, such as NAS, tape, off-premise for example.

Nice.  So, when and how should I use a snapshot then?

Snapshots are great if you’re only going to keep them for a short period of time.  And they’re quite acceptable to use for development and test servers also.  When it comes to production servers however, they’re probably not really recommended as your only form of rollback.  The reason for this, is that when you take a snapshot, you’re not actually making a copy of the virtual disk, so if the disk was to have any issue, or the base disks of the VM are removed, then snapshot files are no longer sufficient to restore the virtual machine back to its original state.

VMWare recommend you don't keep a snapshot for more than 72 hours.  And, if the server is highly transactional, like SQL or Exchange for example, which can generate large snapshots over a short period of time, then consider keeping them for a shorter period of time, otherwise risk running out of space on your data store.

Snapshots can negatively affect the performance of a virtual machine too. Performance degradation is based on how long the snapshot or snapshot tree is in place, the depth of the tree, and how much the virtual machine and its guest operating system have changed from the time you took the snapshot

So, in summary, snapshots are really useful as a short-term solution for capturing a point-in-time state of a virtual machine, and they’re quick to roll back also. However, for your production servers, they should not be kept long term, and … they are not a backup!  So, before you make those critical changes, take an actual backup also, and give yourself some options for when it all goes wrong and you need to roll back.




Deano is part of vBridge's amazing infrastructure team, who are responsible for keeping the lights on, and making sure your IaaS experience is a happy and productive one.