18.11.2015 Views

Beginning Drupal 8

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 14 ■ Administering Your <strong>Drupal</strong> Site<br />

There are three paths to take to address backups on your new site:<br />

• You can use utilities that your hosting provider gives to you to back up your database<br />

and directories.<br />

• You can use a <strong>Drupal</strong> module called Backup and Migrate to automatically back up<br />

your site’s database on a defined schedule, and, just as important, to easily restore<br />

your site from a previous backup.<br />

• You can use Drush to download a copy of your site and database.<br />

All three approaches work equally well, and the Backup and Migrate module is a perfect solution for<br />

those who are less inclined to use operating system–level commands to schedule backups and to create the<br />

scripts necessary to back up your <strong>Drupal</strong> site. The first approach is too broad to cover here because it varies<br />

widely depending on your hosting provider, so I’ll present only the latter two approaches. I’ll then show you<br />

how to restore a site you’ve backed up with either method.<br />

Backing Up with the Backup and Restore Module<br />

You will need to install the Backup and Migrate module, because it is not part of <strong>Drupal</strong> core. You can find<br />

details for this module at www.drupal.org/project/backup_migrate. To install the module, follow the steps<br />

covered in Chapter 11.<br />

To access the Backup and Migrate configuration page, go to http://localhost/admin/content/<br />

backup_migrate (replacing http://localhost with the actual URL where your site resides). After pressing<br />

Enter, you will see the configuration panel for the Backup and Migrate module.<br />

The first step in configuring the Backup and Migrate module is to define where backup files will be stored<br />

on the server. Click the Destinations tab at the top of the page, revealing the page shown in Figure 14-1.<br />

There are two settings for where files will be stored: one for manual backups, where the site administrator<br />

clicks a “Backup now” link to perform the backup, and the automatic backup. I’ll explain how to set up<br />

automatic backups in a minute. You can also set the database that you want backed up. By default, the<br />

module automatically detects the database that your site is running on and sets the parameter. You may<br />

choose to override the default directories and database that are set during the process of installing the<br />

module, or you may, as I do, leave the defaults.<br />

Figure 14-1. Setting the destination directories for backups<br />

158

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!