/usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin COLUMNS=72 /usr/local/bin/drush --root=/var/www/html --uri=localhost --quiet archive-dump --backup-location=/backup

After restoring backup (files and database) following problem appears:

2016/12/15 13:43:17 [error] 148#148: *13 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginException: "Plugin (token_tree_table) instance class "Drupal\token\Element\TokenTreeTable" does not exist." at /var/www/html/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php line 97" while reading response header from upstream, client: 192.168.0.252, server: _, request: "GET /admin/help/token HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.0.15"

After restore some further actions are needed.

$ drush --version
Drush Version : 8.1.8

drupal-8.2.4

Comments

ip6li created an issue. See original summary.

ip6li’s picture

Was my mistake, problem was solved with
drush cache-rebuild
after restoring backup.

Backup/Restore process should be be better documented. Drush is a must have to handle backups.

Backup

Following cron entry should do a daily backup:

00 03 * * * umask 077 && /usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin COLUMNS=72 /usr/local/bin/drush --root=/var/www/html --uri=localhost --quiet archive-dump --backup-location=/backup

Restore

Assumptions:

  • Your Drupal 8 is located at /var/www/html/
  • Your backups are located at /backup/

Following process will hopefully restore a fully working Drupal 8 installation with all your data. You may consider to do a drop database drupal; create database drupal before applying restore.

  1. Stop your web server, so nobody can access your site and change data.
  2. mkdir /tmp/restore && cd /tmp/restore
  3. tar xvf /backup/drupal..tar.gz
  4. mysql -p --user= --host= < drupal.sql
  5. cd /var/www && rm -rf html && tar xvf /tmp/restore/html . && cd html
  6. drush cache-rebuild
  7. Double check file/dir attributes (Selinux?)
  8. Start your web server again
ip6li’s picture

Title: drush archive-dump creates broken backup » Backup/Restore Needs More Documentation
Component: User Commands » Documentation
Issue summary: View changes
Priority: Major » Normal
helmo’s picture

Status: Active » Closed (won't fix)

This issue was marked closed (won't fix) because Drush has moved to Github.
If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.