The ABC of Creating Reliable Backups in Drupal

The ABC of Creating Reliable Backups in Drupal

Find some useful tips on Drupal website data security from our guest blogger Jack Dawson, founder of Big Drop Inc.

In Drupal web development, there are a number of things that can be done to ensure the superior user experience and consistency, as well as save time and pain for the webmaster in times to come. First, you’ll need to have in mind the theme structure of Drupal and how you intend to draft your content in order to take advantage of Drupal’s best aspects and make the site efficient.

As a CMS, Drupal provides a host of advantages especially as relates to the flexibility, allowing you to customize virtually everything about the site design. While this is great, it would all go to the dogs if you forget the most important aspect of running a Drupal site: regular and consistent backups.

According to research last year, hackers penetrated around 30,000 websites daily. That’s scary, right? You can believe that this number is even more today. Post-hacking, not all affected websites end up losing their data. As a matter of fact, hacking is just one among many ways website data can be lost, including corrupted hard drives, botched updates, server hiccups and human errors among others.

Whether for migration or just to be safe, you must have a robust plan to back up your Drupal site consistently. In this article, we’ll discuss how this can be done manually and then automatically.

Backing up Drupal manually

There are two parts to your Drupal site: the database and the files, which are what you’ll be backing up. File backup is very straightforward, you only need to:

  • Run your preferred FTP client to access your hosting server
  • Download your Drupal directory and save it to a safe location – use a cloud solution for added safety, such as your Dropbox account for individuals/smaller businesses or full-scale cloud services for large enterprises. The FTP manual can direct you if you’re unfamiliar with the process

To backup the database itself, which stores your configurations, settings and content, you’ll do it using phpMyAdmin. The steps are given below:

  • Gain access to phpMyAdmin from the cPanel
  • Choose the database to back up from the left-hand menu by clicking on it. This opens all tables found in the database
  • On the top menu, click “Export”
  • Click Custom – "display all possible options” which offers further options. Ensure you have selected all tables.
  • Mark the box with “Add DROP TABLE/VIEW/PROCEDURE/FUNCTION/EVENT statement” which is found under “Object Creation Options”. This configures existing tables to be automatically replaced on database import
  • Select “Go” to save the database in a cloud location of your choice.

Backing up Drupal Automatically

Manual backup is not only time-consuming, you cannot guarantee that you’ll always have the time and/or presence of mind to consistently back up every few days. Luckily, Drupal provides for automatic backup through the use of modules.

The leading module used by more than 250,000 websites today is the Backup and Migrate module. It supports a host of backup storage destinations including FTP, DropBox, email, Amazon S3 etc. You can also schedule multiple backups, exclude tables and restore databases among many other useful backup applications.

In conclusion, remember that this module doesn’t backup files, only the database. However, you can install a different module for file backup. For best results, Backup and Migrate should be used with a cloud storage service like Amazon S3 which is provided for out-of-the-box, or Dropbox, for which an additional module is required.

5 votes, Rating: 4.8

Read also


Mobile application development is a relatively new area of Drupal development services, but it is advancing...


Drupal module development offers us a lot of opportunities, and today I would like to tell you about a...


Want to add video integration to your Drupal website? Drupal module development never stops, offering us...


Drupal web development is on the rise today. The Drupal core is well protected by default, but you can ensure...


In this article we will discuss 2 ways to implement websockets: 1) using Node.js and Tornado web server; 2) using php (Ratchet library) and js.

Need a quote? Let's discuss the project

Are you looking for someone to help you with your Drupal Web Development needs? Let’s get in touch and discuss the requirements of your project. We would love to hear from you.

Join the people who have already subscribed!

Want to be aware of important and interesting things happening? We will inform you about new blog posts on Drupal development, design, QA testing and more, as well news about Drupal events.

No charge. Unsubscribe anytime