How to Backup and Restore Websites on Google Cloud

May 29, 2017Leron AminComments Open

When running applications such as WordPress on Google Cloud, it’s important to have regular backups of your website – this way, you can quickly restore your website in case of an emergency.

If your website ever goes down on Google Cloud, it’s possible to completely restore it in just a matter of seconds!

In this tutorial, you will learn step-by-step how to backup and restore websites hosted on Google Cloud.

Before getting started with this tutorial, you should have already deployed a website on Google Cloud, and reserved a static IP address for your instance.

Backup a Website

1. Create a Disk Snapshot

In this section of the tutorial, you will create a snapshot of the persistent disk that contains your website. Snapshots are used to capture the state of persistent disks at a given point in time, allowing you to restore your virtual machine instances in cases of failure.

backup and restore websites on google cloud
From your Google Cloud dashboard, click on the hamburger menu in the upper left-hand corner of the screen.
backup and restore websites on google cloud
Navigate to Compute Engine, then click on Snapshots.
backup and restore websites on google cloud
From the Snapshots dashboard, click on the Create snapshot button.
backup and restore websites on google cloud
In the Source disk drop-down list, select the disk that you’re backing up. Finally, click the Create button to save changes.
backup and restore websites on google cloud
After creating the snapshot, it will appear on your Snapshots dashboard.

Restore a Website

1. Create Instance from Disk Snapshot

In this section of the tutorial, you will learn how to restore your website from a snapshot.

In order to restore your website from a snapshot, the snapshot needs to have been created when the website was operating correctly. In other words, you can’t take a snapshot of a broken website, restore it, and expect it to work correctly.

backup and restore websites on google cloud
If your website is down, and you need to quickly restore it, follow the steps below…
backup and restore websites on google cloud
From your Google Cloud dashboard, navigate to Compute Engine then VM Instances.
backup and restore websites on google cloud
On your VM Instances dashboard, click on the CREATE INSTANCE button at the top of the page.
backup and restore websites on google cloud
On the Create an Instance settings page, click on the button to change your boot disk.
backup and restore websites on google cloud
In the popup window, navigate to the Snapshots tab at the top of the page, and select the snapshot that you created in the Create a Backup section of the tutorial.
backup and restore websites on google cloud
After selecting the Boot disk, check the boxes for both Allow HTTP traffic and Allow HTTPS traffic, then click the Create button at the bottom of the page.
backup and restore websites on google cloud
If your instance was created successfully, it will appear in your Compute Engine dashboard.

2. Assign IP Address to New Instance

In this section of the tutorial, you will configure your website’s network settings to redirect traffic to the new instance.

backup and restore websites on google cloud
From the Google Cloud sidebar menu, navigate to Network services, then External IP addresses.
backup and restore websites on google cloud
From your External IP Addresses dashboard, click on the Change button next to the IP address attached to the instance that’s running your broken website.
backup and restore websites on google cloud
In the Attach IP address window, select the restored instance from the Attach to drop-down list, then click the OK button.
backup and restore websites on google cloud
After changing your network settings, you should notice that your static IP address is now attached to the restored instance. Now that you’ve restored your website, you should be able to view it in your browser!

That’s it!

Now that you know how to safely backup and restore websites on Google Cloud, you may be interested in automating your backups!

For improved reliability, you should take these preliminary steps before creating snapshots.

Please leave your questions and comments below!

Up Next…

google cloud automatic backups
Setup Automatic Backups for Websites on Google Cloud

Leave a Reply

Your email address will not be published. Required fields are marked *

Made with by

© 2021 One Page Zen Systems, LLC  
Legal  |  Privacy Policy  |  Affiliate Disclosure  |  Contact  

Join our Mailing List!

Exclusive early access to the latest tutorials

Monthly update with a list of upcoming tutorials

Special access to members-only events and webinars