Restoring Data from a Backup
Kyle wants to start testing changes that could affect data on the site.
Here, you’ll restore a manual backup to recover data lost during a test.
Create a Manual Backup from Production
You should always make sure your Liferay instance is backed up before you test changes that could cause data loss or instability.
Create a manual backup before you begin testing.
-
In the Liferay Cloud console, navigate to your production environment.
-
Click Backups on the left side of the screen.
-
Click Backup Now to create a manual backup.
The backup service is unavailable and the buttons on the page are disabled until the backup completes.
Restore the Backup to UAT
When the backup from production finishes, restore it to your UAT environment.
-
Click Actions ( ) next to the manual backup at the top of the list and click Restore to…
-
From the Select Environment drop-down menu, select your UAT environment.
-
Click the checkboxes to confirm the impact of the backup restore.
-
Click Restore to Environment.
Your UAT environment’s services are temporarily unavailable while the backup is restored.
Simulate A Disaster
Simulate disaster by deleting your default home page from your UAT Liferay instance.
-
Navigate to your UAT environment.
-
Click Visit Site at the top of the page to access your UAT Liferay instance. If your session has expired from logging in previously, use your project’s credentials to authenticate.
-
Log in as the default administrator.
-
In the navigation menu on the left side of the screen, click Site Builder → Pages.
-
Next to the Home page, open the Actions menu ( ) and click Delete.
A pop-up dialog appears asking to confirm the deletion.
-
Click Delete.
The home page is deleted, and the deletion cannot be undone. The Home button in the top-right corner of the screen also disappears since there is no longer a home page.
Restore the Backup
Kyle realizes after deleting the page that it shouldn’t have been deleted, and he can’t remember how to make a new one easily. Help Kyle recover the data in UAT by restoring the backup you took before accessing the Liferay instance.
-
In the Liferay Cloud console, navigate to your production environment.
-
Click Backups.
-
Click the Actions menu ( ) next to your manual backup and click Restore to…
-
From the Select environment drop-down menu, select your UAT environment.
-
Click the checkboxes that appear to confirm the impact of the backup restore.
-
Click Restore to Environment.
Your UAT Liferay service is temporarily unavailable while the backup is being restored. Once it’s finished, you can visit the site again to see the home page is restored.
Next: query your Liferay database directly using the shell in the Liferay Cloud console.