Restore a manual backup
You must have Admin access to the environment. You have up to seven days to restore a manual backup. Restoring a backup does not change the code of the current git branch. Restoring a backup in this manner does not apply to Pro staging and production environments; see Pro Backup & Disaster Recovery.
Restoration times vary depending on the size of your database:
- large database (200+ GB) can take 5 hours
- medium database (150 GB) can take 2 1/2 hours
- small database (60 GB) can take 1 hour
- To roll back to previous code or remove added extensions in an environment, see Roll back code.
- To restore an unstable environment that does not have a backup, see Restore an environment.
To restore a backup using the Cloud Console:
-
Log in to the Cloud Console.
-
Select an environment from the project navigation bar.
-
In the Backups view, choose a backup from the Stored list. The backup feature does not apply to the Pro environments.
-
In the
(more) menu, click Restore.
-
Review the Restore from backup information and click Yes, restore.
To restore a snapshot using the Cloud CLI:
-
On your local workstation, change to your project directory.
-
Check out the environment branch to restore.
-
List all available snapshots.
The list returns information about the available snapshots:
-
Restore a snapshot using the snapshot ID from the list.
Restore a Disaster Recovery Snapshot
To restore the Disaster Recovery Snapshot in Pro Staging and Production environments, Import the database dump directly from the server.
Roll back code
Backups and snapshots do not include a copy of your code. Your code is already stored in the Git-based repository, so you can use Git-based commands to roll back (or revert) code. For example, use git log --oneline
to scroll through previous commits; then use git revert
to restore code from a specific commit.
Also, you can choose to store code in an inactive branch. Use git commands to create a branch instead of using magento-cloud
commands. See about Git commands in the Cloud CLI topic.