[Beta]{class="badge positive"}
Restore the previous source code deployed in AEM as a Cloud Service restore-previous-code-deployed
Use Restore previous code deployed to roll an environment back instantly to its last successful build—no pipeline run required.
You simply open the selected environment’s

The Restore previous code deployed feature becomes available only when every condition below is true:
- You hold Environment Restore Create permissions. For details on managing permissions, see Custom Permissions.
- Your organization is enrolled in the beta program and the feature flag is on.
- The program runs on AEM as a Cloud Service.
- The chosen environment is a
Development
environment (temporary Beta limit). - The last pipeline for that environment finished successfully and ran fewer than 30 days ago.
- The environment status is Running and no pipeline is in progress.
If any check fails, Cloud Manager opens the following dialog box that lists one or more unmet conditions and disables Confirm, preventing the restore.
If you just want to restore data, which has been lost, damaged, or accidentally deleted, to its original condition, you can use Restore Content in AEM as a Cloud Service. This restore process only affects content, leaving your source code and version of AEM unchanged.
To restore the previous code deployed:
-
Log into Cloud Manager at and select the appropriate organization.
-
Click the program for which you want to initiate a restore.
-
List all environments for the program by doing one of the following:
-
From the left side menu, under Services, click
-
From the left side menu, under Program, click Overview, then from the Environments card, click
note note NOTE The Environments card lists three environments only. Click Show All in the card to see all environments of the program.
-
-
In the Environments table, to the right of an environment whose source code you want to restore, click
-
In the Restore previous code deployed dialog box, review the currently deployed version and the version you want to restore, then click Confirm.
-
Cloud Manager rolls the environment back to the earlier build, keeps content and configuration intact, and marks the environment Restoring on the Environments page until deployment completes.