This article shows different scenarios of rolling back an environment on Adobe Commerce on cloud infrastructure.
Choose the most appropriate for your case:
Read: Restore a snapshot on Adobe Commerce on cloud infrastructure in our developer documentation.
Creating a snapshot must be our very first step after accessing the Adobe Commerce on cloud infrastructure account and before applying major changes. It is a best practice and highly recommended.
Read: Create a snapshot in our developer documentation.
This section shows how to reset an environment when you have not created a snapshot but can access the environment via SSH.
The steps are:
After performing these steps:
Read the detailed steps below.
We need to disable Configuration Management so that it does not automatically apply the previous configuration settings during deployment.
To disable Configuration Management, make sure that your
/app/etc/ directory does not contain the
To remove the configuration file, follow these steps:
Read more about Configuration Management:
Uninstalling the Adobe Commerce software drops and restores the database, removes the deployment configuration, and clears directories under `var`.
Read: Uninstall the Adobe Commerce software in our developer documentation.
To uninstall the Adobe Commerce software, follow these steps:
The following message displays to confirm a successful uninstallation:
[SUCCESS]: Magento uninstallation complete.
This means we have reverted our Adobe Commerce installation (including DB) to its authentic (Vanilla) state.
With git reset, we revert the code to the desired state in the past.
--reverseto display history in reverse order for more convenience:
git log --reverse
git reset --h <commit_hash>
git push --force <origin> <branch>
After performing these steps, our git branch gets reset and the entire git changelog is clear. The last git push triggers the redeploy to apply all changes and re-install Adobe Commerce.
This section shows how to reset an environment when it is in a critical state: the deployment procedure cannot succeed in building a working application, thus making the SSH connection unavailable.
In this scenario, you must first restore the working state of your Adobe Commerce application using git reset, then uninstall the Adobe Commerce software (to drop and restore the database, remove the deployment configuration, etc.). The scenario involves the same steps as in Scenario 2, but the order of steps is different and there is an additional step – force redeploy. The steps are:
After performing these steps, you will have the same results as in Scenario 2.
Make a commit (this might be an empty commit, although we do not recommend it) and push it to the server to trigger redeploy:
git commit --allow-empty -m "<message>" && git push <origin> <branch>
If executing the
setup:uninstall command fails with an error and cannot be completed, we may clear the DB manually with these steps:
mysql -h database.internal(For Pro environments see: Set up MySQL service).
drop database main;
create database main;
After resetting the DB, make a git push to the environment to trigger redeploy and install Adobe Commerce to a newly created DB. Or run the redeploy command.