Logging and Log Files¶
Log into the admin area of the site:
Recent log messages
Better to use Malcolm’s Drupal Update Notes
Make sure you have a recent backup of your site.
To check the current version of your site, browse to https://www.mydrupalsite.com/admin/reports/status
Download the latest Drupal update e.g.
tar.gz file to the server:
scp drupal-8.6.10.tar.gz www.mydrupalsite.com:repo/temp/
Copy the update archive to the
sudo -i cd /home/web/repo/project/www.mydrupalsite.com/deploy mv /home/patrick/repo/temp/drupal-8.6.10.tar.gz .
Make sure the folder doesn’t already contain a
Extract the update:
tar xzf drupal-8.6.10.tar.gz cd drupal-8.6.10/ # copy our code from the previous version of the site cp -r ../../live/sites/* sites/ # note: our site does not use 'themes', 'profiles' or 'modules'
Make a note of where the ‘live’ folder is currently pointing to (so you can put it back if the update fails).
Put the site into maintenance mode:
Link the new code to the
ls -l /home/web/repo/project/www.mydrupalsite.com/ # e.g. live -> deploy/0_0_01__20190117_135225_malcolm
rm /home/web/repo/project/www.mydrupalsite.com/live ln -s /home/web/repo/project/www.mydrupalsite.com/deploy/drupal-8.6.10 /home/web/repo/project/www.mydrupalsite.com/live
Clear the cache (and update the database) by browsing to https://www.mydrupalsite.com/update.php
I didn’t think I needed to clear the cache, but I think it rebuilds
twig files which are the Drupal templates!
chown www-data:www-data sites/default/files chown -R www-data:www-data sites/default/files/
The update needs to be done by the
rootuser. I think it should be
filesfolders do not contain any files:
/home/web/repo/files/www.mydrupalsite.com/private/Why are the files for the Drupal site not in these folders?
See the PHP documentation
With regard to the Salt scripts you asked about:
restore.sh restores the drupal files from a compressed tar backup
restore_db.sh restores a mysql database from an SQL script.
I created them so we could restore the journal system from a snapshot and modified them for use in the upgrade to Drupal 8. I thought the best place for them was in the Salt configuration.
To use them in the current configuration we would need to restore the files backup and create a compressed tar and restore the database backup.