⚠️ It’s always a good idea to make a backup of your site before applying updates!
Drupal CMS checks for compatibility before applying updates, and downloads and tests the updates as best it can, but updating code is never 100% safe. And even if the code works, some updates may include changes that will break the unique functionality of your site.
The specific process for backing up your site will depend on your hosting provider. But, there are some common steps for all backups.
A complete backup is one that you allows you to easily roll your site back to the state it was in before attempting an update and includes:
- A snapshot of your site’s database
- A copy of any user-uploaded files, like images embedded in a blog post
- A snapshot of the current codebase
- A rollback procedure that has been tested and documented
Prefer your hosting provider's backup tools
If your hosting provider offers backup tools or automated snapshot features, use them! Many managed Drupal hosting services provide one-click backups, scheduled backups, and easy restoration tools. Review your hosting provider's documentation before setting up custom backups.
Back to topWhen to make a backup
For attended updates (you’re actively involved in making the update), you should manually create the backup before proceeding. Especially if your site does not have automated backups.
For unattended updates, you should automate the backup process so that it happens in conjunction with applying updates. Drupal CMS does not have a built-in system for making backups, so you’ll need to set this up yourself. This might mean using a module like Backup & Migrate. Some site administrators choose to set up environment processes that execute scheduled cron tasks, in order to automate the process of creating a backup before updates are applied. This makes it possible to safely rollback the site to a working state in the event of an update failure.
Back to topHow to make a backup
As mentioned earlier, consult your hosting provider's documentation to see if they provide any one-click backup options as a first step.
To set up your own custom backup strategy, start with learning more about making backups.
Back to topWrap-up
You should always make a backup before applying updates to your site to ensure you have a way to recover if anything goes wrong. In this tutorial, we discussed what you should backup, and walked through scenarios of how you can create a backup.
Back to topAdditional resources
-
How to back up your Drupal site (Drupal.org)