Restore an environment from a backup
On this page
Once you have backups of your environment, you can restore data from a previous point.
To restore an environment, you need an Admin role for that environment type.
To restore an environment, first select one of the available backups:
To restore the backup you’ve selected, follow these steps:
The data is restored and your backed-up environment is deployed. This deployment uses the built app, including variables, from when the backup was taken.
The code is also initially restored, but Platform.sh doesn’t modify your Git repository. So any future (re)deployments use the current Git repository to build the environment.
To restore your code to its previous state when the backup was taken, use Git commands such as revert.
You can restore backups to a different environment than they were created on using the CLI:
Switch to the branch where the backup was created.
To restore your backup to an existing environment, run the following command:
platform backup:restore --target=TARGET_ENVIRONMENT_NAME BACKUP_ID
If your target environment doesn’t exist yet, you can create it by branching an existing environment. The new target environment will be an exact copy of the existing (parent) environment.
To do so, use the
--branch-fromoption to specify the parent of your new target environment:
platform backup:restore --target=TARGET_ENVIRONMENT_NAME --branch-from=PARENT_ENVIRONMENT_NAME BACKUP_ID