Home Assistant Google Drive Backup: Setup, Restore, and Best Practices

Author

Reads 918

Home monitoring security.
Credit: pexels.com, Home monitoring security.

Setting up a Home Assistant Google Drive backup is a straightforward process that requires a Google account, the Google Drive API, and the Home Assistant Google Drive backup component.

To begin, you'll need to create a Google Cloud Platform project and enable the Drive API. This will provide you with a set of credentials, including a client ID and secret, which you'll use to authenticate with Google Drive.

Next, you'll need to install the Home Assistant Google Drive backup component, which allows you to back up your Home Assistant configuration and data to Google Drive.

Setting Up Google Drive Backup

To set up Google Drive backup, start by launching the Home Assistant Google Drive Backup add-on and accessing its web interface. You'll need to authenticate with Google Drive by clicking the big blue button Authenticate with Google Drive.

This will open a new tab where you'll complete the authorization process, which is straightforward. Once you're done, copy the authorization string and paste it into the previous tab with the Get Started label, then click Save.

Credit: youtube.com, Setup Home Assistant Google Drive Backup In 3 Minutes!

Now the add-on has access to your Google Drive, and backups will be saved there. In the add-on's web interface, click the Settings button to configure the backup settings. You can also do this on the add-on's screen by clicking the Configuration tab and adjusting the values for max_backups_in_ha, max_backups_in_google_drive, days_between_backups, and backup_time_of_day to suit your needs.

For example, I've set up my backups to save one weekly and two monthly copies, with a daily backup created on Sundays.

Backup Options

Implementing backups for Home Assistant is critical to prevent data loss in case your storage media fails. Home Assistant backups are stored locally by default, but remote backups to the cloud or a NAS can be set up.

The Google Drive add-on is a robust tool that backs up your HA configuration to Google Drive for safe keeping. You can set up complex scheduling and rotation schemes with it.

You can also use the native NAS (SMB/NFS) backup feature in Home Assistant 2023.6, which supports backups of any size. This feature makes the restore process easier and more convenient.

Option: Location

Credit: youtube.com, How to make a Complete Backup & Restore | Google Drive Cloud Backup

When configuring your backup options, the location of your backups is a crucial setting. You can choose to store your backups on your local disk or on a network storage device.

The default backup location is "None", meaning backups will be created in whatever Home Assistant uses as its default backup location.

If you want more control over where your backups are stored, you can specify a backup network storage device by its name. This allows you to choose where your backups are created before they're uploaded to Google Drive.

To restore a backup, you'll need to browse through your backup files stored on Google Drive, identifying the specific backup based on its date and size.

Options

You have several options when it comes to where your backups are created in Home Assistant before being uploaded to Google Drive. The default location is the default backup location used by Home Assistant.

You can choose to store backups on your local disk by setting the backup location to "local-disk". This is a simple and straightforward option that doesn't require any additional setup.

Credit: youtube.com, Incremental vs Differential Backup, & Full - Explained

If you have a NAS (Network-Attached Storage) device, you can also store backups there. Home Assistant supports both SMB and NFS protocols, making it easy to integrate with your existing NAS setup.

To specify a backup folder in Google Drive, you need to turn on the option to select a folder. Once you do this, you'll be prompted to choose a folder when you restart the add-on and visit the Web-UI.

Delete After Upload

Deleting backups from Home Assistant after they're uploaded to Google Drive is a convenient option. This feature is particularly useful if you have limited space on your Home Assistant machine.

You can set up Home Assistant to delete backups immediately after uploading them to Google Drive by using the "delete_after_upload" option. This option is set to False by default, but you can change it to True to enable this feature.

When you enable "delete_after_upload", backups are always deleted from Home Assistant after they've been uploaded to Google Drive. This means that the "max_backups_in_ha" setting is ignored, since you'll only need to keep one backup locally.

By deleting backups after upload, you'll free up space on your Home Assistant machine. This is especially helpful if you only have enough space for one backup, making it a great option for those with limited storage.

Restore

Credit: youtube.com, How To BACKUP Home Assistant On Google Drive 📂 | Backup and Restore Option (Drive, NAS, Automation)

Restoring your Home Assistant data from Google Drive is a straightforward process, but it does depend on the size of your backup archive. If your backup is under 1GB, you can simply download the latest backup to your local computer and restore it on the HA welcome screen.

However, if your backup is over 1GB, you'll need to use an add-on like Samba share to upload the large backup file to HAOS. This process involves reinstalling a fresh copy of Home Assistant OS, waiting for the install to complete, and then navigating to the IP address of the new HAOS instance.

To restore a backup from Google Drive, you'll need to locate your backup file in the add-on's Web UI and identify the specific backup you wish to restore based on its date and size. You can then click on the backup, select full backup, and enter your backup password (if any) to initiate the restore process.

Credit: youtube.com, I RESTORED My Home Assistant From Backup In Under 5 Minutes!

After restoration, it's essential to verify if everything works as expected by checking if all devices and automations are functioning correctly.

Here's a step-by-step guide to restoring a backup from Google Drive:

  • Reinstall a fresh copy of Home Assistant OS
  • Wait for the install to complete and navigate to the IP address of the new HAOS instance
  • Locate your backup file in the add-on's Web UI and select the specific backup you wish to restore
  • Click on the backup, select full backup, and enter your backup password (if any)
  • Click on RESTORE, acknowledge the warning, and click on RESTORE again

Remember to always have a backup of your Home Assistant data, especially if you have sensitive information stored, such as account credentials and device information. Regular backups will ensure that you have an up-to-date copy of your data, making it easy to restore in case of an unexpected situation.

Configuring the Add-on

To configure the add-on, open the "Backups Explorer" page and move to the "Configuration" tab, though typically no manual configuration is needed to get started.

Click on "Open Web UI" to configure your Google Drive backup settings.

After installing the add-on, switch to the "Info" tab and click "Start" to run the add-on, ensuring "Watchdog" is also enabled.

Delete After Upload (Default: False)

The Delete After Upload option is a useful feature for managing your backups. It's set to False by default, which means backups will remain in Home Assistant after being uploaded to Google Drive.

Smart home devices equipment
Credit: pexels.com, Smart home devices equipment

If you have limited space inside Home Assistant, you can enable this option to delete backups immediately after uploading them to Google Drive. This will free up space for new backups.

When Delete After Upload is set to True, backups will always be deleted from Home Assistant after they've been uploaded to Google Drive. This means you'll only need to keep one backup locally.

Here's a summary of the Delete After Upload option:

Some users find this option useful if they only have enough space on their Home Assistant machine for one backup. It's essential to consider your storage needs before enabling this feature.

Configure the Add-on

To configure the add-on, you'll need to open the "Backups Explorer" page and switch to the "Configuration" tab. Typically, no manual configuration is needed to get started.

Once you've installed the add-on, you'll need to start it by switching to the "Info" tab and clicking "Start". Make sure "Watchdog" is enabled as well.

smart home automation
Credit: pexels.com, smart home automation

After starting the add-on, you can access the web UI by clicking on "Open Web UI" in the "Info" tab. This is where you'll configure your Google Drive backup settings.

To get started, follow these steps:

  1. Open the "Backups Explorer" page.
  2. Switch to the "Configuration" tab (if necessary).
  3. Start the add-on by switching to the "Info" tab and clicking "Start".
  4. Enable "Watchdog" in the "Info" tab.
  5. Access the web UI by clicking on "Open Web UI" in the "Info" tab.

Viola Morissette

Assigning Editor

Viola Morissette is a seasoned Assigning Editor with a passion for curating high-quality content. With a keen eye for detail and a knack for identifying emerging trends, she has successfully guided numerous articles to publication. Her expertise spans a wide range of topics, including technology and software tutorials, such as her work on "OneDrive Tutorials," where she expertly assigned and edited pieces that have resonated with readers worldwide.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.