Oh No! A Quick Guide to Drupal Backup Strategies

The Scenario

Many of us have been there – we walk into the office on Monday morning, go to the break room to grab a cup of coffee before we sit down to our workstation, intending to ease in to the day. Our email client is started up and immediately a flood of emails marked “urgent” work their way into our Inbox. Oh. No. It seems we weren’t “easing into” the day after all…




No worries, right? We’ll just go in and restore the database backup on our Drupal site from last night, right? I mean, we’re sure it was working each and every night…

About that time, we log into the web server and find that some obscure Apache / IIS / Tomcat zero-day exploit has been executed on our server, and the entire directory is corrupted and/or gone.

Oh. No.

Drupal Backup Strategies

We have all heard that a site needs to be backed up “offsite,” but how many server admins have actually implemented such practice? In my experience, we either tarball the entire web directory and store it elsewhere on the web server, on another server in our network, or even a cloud server. There are a plethora of handy backup assistant bash / Perl / Python scripts out there, often involving an intense rsync command and potentially some logic that keeps a set number of backups and deletes the older ones.

Those of us who do a lot of development and hosting on cloud servers may take advantage of Amazon EC2’s snapshots, saving them into S3 buckets, but this strategy can add up in cost.

Rsync and crontab require a certain amount of server administration experience, something not all developers possess.

Enter: NodeSquirrel.

For those who haven’t heard, NodeSquirrel was recently acquired by Pantheon and started offering FREE cloud backups for Drupal users! One receives 5GB of storage for one site for the grand cost of zip, zero, nada, nichts. This handy backup is unreasonably easy to get up and running on your Drupal site, within minutes, right now. Not only does it back up your database, it will also back up your entire code base. What? Yes, you read that correctly! Theoretically, if one’s server crashes or is compromised, one could have the entire site up and running again after downloading the tarball from NodeSquirrel, extracting it, importing the database, and copying over the Drupal .htaccess file!

Get NodeSquirrel Running

First, download, install, and enable the latest version of Backup and Migrate, which actually includes support for NodeSquirrel by default.

Next, sign up for a free NodeSquirrel account, and note the Secret Key.

Log into your Drupal site and head over to admin/config/system/backup_migrate/nodesquirrel. Add your Secret Key to the NodeSquirrel Credentials section:

Screen Shot 2015-07-28 at 2.03.51 PM


Next, you’ll want to go configure the Backup Schedule:

Screen Shot 2015-07-28 at 2.04.01 PM

Here I’ve elected to backup the Entire Site, including the code, files, and database, to the NodeSquirrel cloud. Once per day, the whole site is backed up, and the old backups are deleted!

Finally, run a backup and make sure that everything is Ok – it should run via Drupal’s cron since it will be quite large. I gave it a day to run at around midnight before checking the page again in order to verify that my backups were working (NodeSquirrel is differential it seems, and will not back up your site if no changes have been made.)

Screen Shot 2015-07-28 at 2.04.10 PM

That’s all there is to it! Happy backup-ing and you may now rest easy with the knowledge that your site is completely backed up into the cloud!

Adam Behnke

Adam Behnke

Adam is a mobile/web developer for Accella who has been developing telecom and web applications since the mid-90's, before the dot-com bust. With a heavy telecom background, Adam can speak fluently in 3GPP, ASN.1, SS7, and SIGTRAN as well.

One Response

  1. Does nodesquirrel encrypt the files at rest ? How to tell backup and migrate to automatically encrypt the files when uploading to for example s3 bucket?

Leave a Reply

Your email address will not be published. Required fields are marked *



Recent Posts