I took a SQL backup of my Magento 2.2 dev site before I did some testing. The testing didn’t go as planned so I tried the rollback feature from inside the Magento admin panel. The rollback process started, but then the page just went blank.
When I did a refresh the page said I was in maintenance mode. I decided to SSH into the AWS instance and see what was going on. The server seemed okay, but it was stuck in maintenance mode. I disable maintenance mode and decided to run the rollback from the terminal.
php bin/magento setup:rollback -d db_sqldump11282018.sql
DB rollback is starting… Segmentation fault
So, there’s my problem, the rollback must have run into a “Segmentation fault“. I found this is an issue that Magento is aware of and are they are working on a fix.
The workaround is pretty easy all you need to do run this command with your magento system user before you do your rollback command.
ulimit -s 65536
Results of rerunning my rollback command.
[SUCCESS]: DB rollback completed successfully. Please set file permission of bin/magento to executable Disabling maintenance mode
Make sure you clear you cache after a rollback.