Understanding the Difference Between Backups and Snapshots on Alibaba Cloud

Image for post
Image for post

As the person responsible for one or more servers, one of your most important tasks is to design and implement an effective backup strategy. Having recent, reliable backups guarantees your ability to recover from a whole host of events that would otherwise spell disaster for the server and possibly your entire business. Such events include a ransomware or virus attack, a serious system crash, data corruption caused by hackers, or a mistake made by a system administrator such as inadvertently formatting the wrong disk.

When you’re working with servers on Alibaba Cloud, and indeed with any other cloud provider too, you will notice that you are often provided with a choice between taking a backup or a snapshot. While backups and snapshots are similar, they should not be considered as interchangeable.


An HBR backup plan allows you to specify which files and directories get included and excluded, how often the backup job should run, and how long to store the backup before it is automatically deleted. You can also start a backup job manually on demand whenever you wish. Restoring one or more files from a backup can be performed quickly and easily from the web-based management console by anyone who is authorised to use it.

Backing up conventional files such as documents and programs is pretty straightforward. In the case of databases, however, some additional consideration is required. Even though databases are stored on disk as conventional files, you can’t simply back up those files like any others because you can’t be confident that they are in a stable state. The Hybrid Cloud Recovery solutions takes care of this automatically, and can thus be used to back up and restore databases such as SQL Server, MySQL and Oracle.

It’s important to remember that file-level backups are designed to protect you from incidents (malicious or accidental) that affect one or more files, rather than the entire integrity and stability of the server as a whole. Even if you back up the entire file system, including all of the operating system files, you will still not be able to restore the entire server in the event of a disaster such as a corrupted boot record. Or indeed from any other event which is sufficiently serious to prohibit you from gaining access to the server in order to run the restore process. For such cases, a snapshot is a better option.

If you do wish to create a backup of an entire server, you can install and use a third party backup utility. One leading product is Veeam Backup. As of version 9.5 Update 4, Veeam now fully supports Alibaba Cloud’s Object Storage Service (OSS), which allows for unlimited amounts of data stored in cloud-based vaults. This can be used to create partial or full backups of servers both cloud-based and on-premises.


Taking a snapshot of an Alibaba Cloud ECS server is simple and can be performed from within the web based management console by anyone who has permission to do so. You can specify how long to keep the snapshot for, and you can optionally encrypt it if required.

When you first create an Elastic Compute Service server, you can also configure the system to take a snapshot automatically. When enabled, the default policy is to create one snapshot each day at 5am, 7 days a week, and keep it for 7 days. You can change this if you wish, creating up to 24 snapshots a day (1 per hour) and keeping them for up to 65535 days. Up to 1000 automatically created snapshots can exist for each disk, after which the earliest one will be overwritten.

You can even create a custom image from a snapshot, which provides an ideal mechanism for rolling out multiple copies of a server once you have spent time developing and testing a particular configuration.

Snapshot Suitability

Snapshots can’t be copied to multiple geographic regions, so they don’t provide the same degree of resilience and protection as a conventional backup. Also, it’s not possible to verify a snapshot.

Snapshots are best used on development or test servers rather than production machines, because the facilities they provide will typically be of most use in such environments. For example, if you want to test a new security patch or a new OS build, or perhaps a data migration task, take a snapshot before you start. If everything goes as expected, delete the snapshot after a few days. If problems are discovered, simply roll back the server to the state contained in the snapshot and your test server will be back to normal with no need to rebuild it. You can then modify your procedure slightly and try again, repeating the process as many times as it takes to get it right.

Snapshotting Running Instances

In environments where a single server provides just a single function, such as running a web server without a locally-installed database engine, creating a snapshot of a running instance is likely to be perfectly safe and will provide a similar degree of functionality to a conventional backup. In other circumstances, it may be preferable to stop and shut down the server before taking a snapshot, for more predictable results when the server is reverted.

Keeping Costs Down

HBR uses what’s known as an incremental backup mechanism in order to keep backup sizes, and thus your costs, to a minimum. If you back up a folder twice, the second backup will only contain those files which changed after the first backup was created. Any files which are unchanged will not be backed up a second time. This is known as an incremental backup.

Because snapshots contain an entire copy of a server including all its files and RAM contents, snapshots are generally larger than backups.

In Summary

If you don’t already have an Alibaba Cloud account you can create one for free at https://www.alibabacloud.com/

Original Source:

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store