A single DDoS attack or failed WordPress update can bring your website to its knees. So, to ensure that weeks, months, or even years of work don’t go down the drain, you need to make sure you have copies of your data.
Snapshots and backups are an effective backup strategy. In case of data loss, they ensure that it can be restored or “rolled back” to the latest version.
Although both backups and snapshots “copy” data, they are still different methods of protecting digital assets. In this article, we will discuss what a snapshot is, what a website backup is, and what the differences between them are.
What can lead to data loss or destructuring?
Human factors:
- unsuccessful updates and deployments;
- accidental deletion of files or folders;
- overwriting, conversion, or editing of data;
- unintentional formatting;
- incorrect data storage.
Technical and force majeure factors:
- hardware damage: damage to the integrity of the storage device or other data carrier;
- software failures;
- cyberattacks (DDoS, SQL injections);
- power outages, natural disasters: fires, earthquakes, etc.
However, data loss can still be avoided with a proper backup and recovery plan.
HostPro provides automatic daily backups for all Hosting and VPS plans to preserve your website data, as well as DDoS protection for each plan.
What is a snapshot and what is it for?
A snapshot is an instant “snapshot” of the current state of your server’s file system at a given point in time. In simple terms, it is a log of changes to the original virtual hard disk.
With a snapshot, you can “roll back” to the previous state if something goes wrong during development (update, deployment) or testing.
There are four classic types of snapshots that will affect the rollback differently.
- Manual snapshots are done by the administrator’s “hands” at a specific moment when they are needed.
- Automatic snapshots are scheduled to capture a system at a particular time.
- Application-level snapshots keep the state of only one program, database, or service.
- System-level snapshots capture the whole system.
However, making backup copies from snapshots is bad practice. The physical server’s disk may become full, and at the moment of “rolling back,” your snapshot may lose integrity, and you may lose your data.
When a snapshot is launched, writing to the storage device is suspended, and all operations are performed in a separate file. If nothing happened during the changes, all the information will then simply be automatically rewritten to the main disk, and the snapshot will be deleted.
If you need to roll back a file or virtual machine to its previous state, you will only need to delete the files with the changes and continue using the disk from the moment of the snapshot.
Why are snapshots needed?
Snapshots are needed to obtain the virtual machine settings and disk status at the time the virtual server was running. Snapshots are most often used for testing, tracking changes on the server to prevent any potential damage to the system before updating, modifying software, removing components, etc.
Take WordPress, for example—if you edited a WP file (for example, you added a function) and realized that you need to revert the file, then a snapshot will help.
Or, for example, we changed the settings and/or content, and at some point realized that we needed to roll back. If the file system did not change, its size did not change, or it was not recreated from scratch, as happens when reinstalling the server, and only changes were made to the files (including the database), then a snapshot will also help to roll back.
However, they (snapshots) are only available for a short time (1 day), which means that the last copy we have is stored as a snapshot, and everything else is stored as backups.
It is important to understand that a snapshot will only help if you need to return to a specific point in time when changes were made on the server and correct any mistakes, but it is not a complete copy of all data. Snapshots cannot replace backups because they do not store all data, only the state of the system and the history of changed files. Therefore, it is impossible to restore information that has already been lost using only a snapshot.
What are backups and what are they used for?
A backup is a copy of system data created and stored in a backup location (local storage, FTP/SFTP storage, or cloud repositories) that you can use to back up and restore lost data.
Backups are usually regular and performed on a schedule. For example, at HostPro, cron makes automatic backups of all sites on the servers every day.
Backups can be created in various formats, such as full backup, incremental backup, and differential backup. A full backup records all data in the system, while incremental and differential backups record only the changes that have occurred since the last backup.
- Full backups are backups of all data: files, system settings, etc. During the first full backup, the entire volume of data (files, folders, settings) is copied. During subsequent backups, the entire volume of data is copied again.
Creating full backups is a resource-intensive process, so in order not to interfere with the work of programs and slow down the server, companies that use this type of backup usually do it at night, when the load on the system is minimal.
Example: You take one photo at the beginning of a party where all the guests are present, and then you regularly take new photos (regardless of whether anyone has arrived) – this is a full backup.
- Incremental backups are copies of only the data that has changed (added or deleted) since the last backup, which means faster execution and less disk space.
A full backup is always performed before an incremental backup, and then increments are applied—only new or changed files are saved.
Example: You take one photo at the beginning of the party with everyone present, and then you only photograph new guests who arrive during the evening—this is an incremental backup.
At HostPro, we do incremental backups, which means we only store data that has changed since the previous backup. This allows us to use disk space for backups more efficiently and economically. It also allows us to create and restore backups faster.
- Differential backups are something between full and incremental backups, copying all files and all changes that have changed since the last backup. It contains all changes since the last full backup, but does not replace it.
- Example: You take one photo at the beginning of the party with everyone present, and after the party, where you can see how everything has changed since the beginning – this is a differential backup.
When might you need a website backup?
- Your site has been hacked. If backups of your content and core files are stored outside of your site, you can quickly restore them and minimize service interruptions for your customers.
- Failed update. After an update, plugins and themes may start to conflict with each other and with the WordPress core. With a properly created backup, you can roll back to the previous version and return to normal operation.
- Accidental deletion of important files. Perhaps you are working on the backend of your website and have deleted a critical file or corrupted a PHP script. With a backup of your website, this problem can be fixed before most people even realize that something has gone wrong.
- Errors while testing new designs or features. For example, you want to try out a new marketing idea that requires certain changes to your website’s design. You’re not sure if it will work, but the only way to find out is to test it. With a backup, you can run tests without worry or fear.
- Transferring a website to a new hosting provider. For a successful migration of a website and database to a new hosting provider, you need to provide links to the website archive and database archive.
What is the difference between a snapshot and a backup?
| Characteristic | Snapshot | Backup |
| Type of Data Preservation | Not a copy of system data, but the current state of the file system, a snapshot, so to speak, hence the name snap shot. | A copy of all or a specific set of system data. |
| Creation Principle | It is more spontaneous in nature and is created as needed. | Usually created regularly (daily, weekly, etc.). |
| Amount of Data Stored | Does not store all data, only the history of changed files. | Stores all data in a single version, which is transferred to a storage device. |
| Structure and Contents | A copy of your object’s metadata at a specific point in time.Stores the location of files, as well as records of all changes (events) that have occurred with them since the last launch. | A complete copy of your database.Stores all types of data: files, folders, code, disk partitions. |
| Creation Speed | Can be done in a few seconds, it will be stored alongside the input data. | A lengthy archiving process that involves temporarily stopping operations on the files being copied. |
| Device State During Creation | Can be done with the equipment turned off. | Can only be done with the machine turned on. |
| Retention Period | Available for a short time (1 day). | Available for a long time (30 days). |
| Storage Location | Can only be stored in the same location as the source data. | Usually stored on a different backup server. |
| Purpose and Use Cases | Used for version control to mitigate any potential damage to the system before updating, changing software, removing components, etc.Useful for development and testing. | Used to store full backups of data off-site.Useful for long-term data protection. |
| Level of Protection | Do not create a separate isolated copy of data, remaining vulnerable to failures that affect the working server. | Create separate isolated copies of data that are not vulnerable to failures that affect the working server. |
| Recovery Capabilities | When restoring from a snapshot, you can restore data changes, file versions, deleted data, user settings, and system settings. | When restoring from a backup, you can restore all data or select individual objects for restoration—a directory (folder) or file. |
So, when should you use backups, and when should you use snapshots? Backups are a good choice if you need to create a complete copy of your data.
Snapshots are a good choice if you need to quickly restore a small amount of data.
In conclusion
Data is the most valuable resource for any online business. Therefore, protecting it and being able to restore it completely will help you avoid financial losses and reputational risks.
Both snapshots and backups are powerful tools that will help you protect your data and restore it when needed. Using both approaches according to specific requirements maximizes data security and operational resilience.
However, backup will always be a more reliable method of backup in cases where long-term data storage and protection against various types of threats are required.
We would like to remind you that Hostpro provides automatic daily backups on all Hosting and VPS plans.
FAQ
- How long should I keep a snapshot?
Snapshots are created to be kept for a short term, from a few hours to a few days, as they weren’t designed to be kept for a long period. They are used to help save your site’s look at a specific moment, especially before updating anything, and that is all.
You should avoid keeping them for a longer period because it can slow down your website performance and consume too much disk space, as snapshots are kept on the same physical server as your website, and snapshots grow over time if your website data updates. To avoid this, you should delete a snapshot after committing the task or, preferably, 72 hours after shooting.
2. Will snapshots slow down my server?
Snapshots themselves take place at the same physical server as your website. While you are storing your snapshots for a long time and continue updating your website, snapshots also grow as they save all the new details that you add to your site. As a result, your server files start to load with a lot of unnecessary duplicates.
3. What is the difference between backup and snapshot?
A snapshot is a “picture” of updated parts of your website that take place on the same physical server as your website and should be kept for a short time. It can come in handy if you lose a file or some little files, before you install new plugins or recode something. It is important not to use only full backups to economise the amount of server memory.
A backup (we talk about ordinary full backups) is a copy of the whole website system that takes place on a different physical or cloud server. Backups are designed for the long term in order to restore the website from failures, big hacking and huge amounts of data loss. Usually, great hosting providers provide daily or weekly backups to customers, as it is one of the most important things for website security and uptime.
4. Is a snapshot a full backup?
No, they are different things. Snapshots are created for short-term rollback used during changes on a website. They capture only the state of your system in a specific moment. Alternatively, full backups picture all the information, including files, plugins, databases, etc.
5. How long does it take to restore from a snapshot?
Restoration from a snapshot is faster than from backups because you roll back only the last update. Usually, it will take a few minutes or a few hours; everything depends on the amount of data to be restored.