A database copy from one environment fails, and the stated reason for it is that it failed to sanitize the database. The error in the copy task would look something like this:
In Extension.php line 162: << << SplFileInfo::getMTime(): stat failed for /mnt/www/html/example/docroot/profiles/contrib/lightning/profiles/lightning/lightning.info.yml << << << [Acquia\Blt\Robo\Tasks\DrushTask] Exit code 1 Time 0.403s << [error] Failed to sanitize database!
It's not obvious from the error message, but the resolution to this, we've found, is to clear the caches on the source database before copying. Either do so from your site's Performance menu under the Drupal, or SSH into your instance and clear it with
A more involved measure to resolve this is documented at a closed issue on drupal.org.
If a Drupal cache rebuild doesn't work, based on the notes in the issue above and what we've found to work for other customers, can you run the following locally:
- Create a separate branch to try this on, in case you need to revert back. The changes created by the following commands are likely to be numerous.
- Run the following:
rm -rf vendor docroot/profiles/lightning composer install
Commit the changes that makes to your repository, and maybe do that on a separate branch so that you can just delete the branch if it doesn't work and restoring to the previous state of the code is easier.