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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

When the backup is completed, <strong>Drupal</strong> will redisplay the screen with information including the name<br />

of the backup file that was generated, the directory where it was stored, and how long the backup took to<br />

execute.<br />

Backing Up with Drush<br />

Using Drush from the command line provides a simple solution for those who are comfortable with<br />

the command line. To back up the database only, simply execute the following Drush command from a<br />

command prompt while positioned within the directory structure of your site, replacing with the<br />

name of the file you wish to create:<br />

drush sql-dump –result-file=<br />

This results in a SQL dump being created and stored in the root directory of your <strong>Drupal</strong> site. If you<br />

wish to back up your entire site, including code, files, and the database, use drush archive-dump, which<br />

results in an archive with three files in it, a file for the database, code, and files. In the case of archive-dump,<br />

Drush creates a file name for the archive based on date and time and reports where it places that file upon<br />

completion of the process.<br />

Restoring a Backup<br />

If, for some reason, you need to restore your system to a previously backed-up state, you can use the same<br />

tool that you used to create the backup, as described next.<br />

Restoring with Backup and Migrate<br />

If you need to restore your system from a backup created with Backup and Migrate, return to the Backup and<br />

Migrate administration page (http://localhost/admin/content/backup_migrate) and select the backup<br />

file to restore. Click the Destinations tab, revealing the list of destination directories where backups are<br />

stored. See Figure 14-4.<br />

Figure 14-4. Listing the backup directories where backup files are stored<br />

Because we backed up our system using the manual backup process, click the “list files” link for Manual<br />

Backups Directory, revealing the page shown in Figure 14-5.<br />

160

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

Saved successfully!

Ooh no, something went wrong!