Upload snapshot for restoring or migrating

When trying to migrate or restore a Home Assistant instance to a new server, it would be really useful to be able to upload a snapshot to the new instance from the Web UI.

This would also help where a user wants to revert back to a previous snapshot stored remotely.

Even better would be an option to upload a snapshot from the initial ‘create a user’ screen.

The workaround is to create a snapshot (so the backup folder is created) temporarily install the samba share add-on and upload to the backup folder, then install that.

I Agree it would be useful but see how difficult it could be to map the available network connections where the snapshot is stored.

Don’t forget to vote for your own request.

1 Like

Nothing so complicated. You just upload from local machine. You can download the other snapshop easily enough to the local machine via the UI.

From where?

You have to connect to somewhere to download it. Hence the need to set up SAMBA or use SCP.

EDIT: USB would probably be easy enough. The framework is already there to alter the network and other settings using a USB drive at boot.

Use case;

Migrating from existing setup or a need to completely rebuild setup.

  1. Take snapshot of existing setup from WebUI.
  2. Download snapshot from WebUI
  3. Install new system/ instance of HassIO/Home Assistant
  4. On opening page, offer the ability to upload a snapshot and restore it. You will find it in your ‘downloads’ location.
  5. Alternatively create initial user to test setup. On Snapshot page, offer the ability to upload a snapshot and then restore it as usual.

Currently, you need to create user, create a snapshot (it creates the backup folder), install samba add-on, connect to folder, copy snapshot, restart HA (so it finds the snapshot), then restore snapshot.

[edit]

In this way all you need is the WebUI to old and new systems (or new as a minimum).

[edit2]
Something like PHP - File Uploading with the backup folder as the target folder and bringing up the restore snapshot dialogue once uploaded.

1 Like

You still haven’t answered my question

From where?

I don’t think you understand the difficulties in this step.

From the same machine running the web browser. Have you never uploaded a file via a web browser to a website?

It really isn’t difficult.

[edit]

It is even built into this forum

image

For a snapshot, it is a tar rather than an image file.

Thank you. That’s definitely do-able.

1 Like

I would like to see this feature.

My use case would be for quick recovery after a failure. If I am rebuilding HA from scratch with an snapshot it would be good to have an option in the first start wizard to upload a snapshot via the web browser.
This would allow very quick back to operation.

Currently I need to complete the wizard, install a plugin to get ssh or samba access, transfer the snapshot then restore.

2 Likes

Another vote for this feature. Having just lost my current install due to a failed upgrade to the latest version of HassOS, I am currently trying to load my latest daily backup to the newly installed instance of HassOS, only to find there is a download button, but no upload… so now I have to figure out how to get my snapshot into the Rpi, which seemingly involves installing a few Add-Ons only for those to be of a temporary nature. Makes no sense…

3 Likes

Just migrated to a new host and thought this was a weird road block myself.

Even better than having this feature on the Supervisor -> Snapshots page would be to have an option directly on the very first login/user creation page for “Or restore from backup” where you can upload the file and get it to wipe/restore more easily.

4 Likes

A good example of this is the UniFi controller software. It give you the option to load a backup or start a new install.

file.

UniFi restore backup

1 Like

You can already do this now, if you have the configurator addon installed. This is advisable anyway as a fallback.
But I agree, you should be able to do this from the snapshot interface

As an aside, if you’re running Hass.io or whatever we are calling the supervised version these days, the Google Drive add-on can easily do this.

Of course comes with the caveat that you need the add-on as well as want to upload things to Google…

But it’s very solid and I’ve moved a number of times between hardware with it.

I’m doing the Supervised thing inside a little Linux VM currently, but moved to it from a Pi using the add-on.

Basically the steps are:

  • Make a snapshot using the Google Drive add-on.
  • Load up a fresh copy of HA on something.
  • Turn off the old one.
  • Steal it’s static IP on my LAN for the new one.
  • Install the Google Drive add-on in the new one as first step.
  • Tell the add-on to go get the image and pull it local.
  • Tell Supervisor to restore from it.

Done.

Agree it would be nice if HA could do it natively with a locally downloaded and uploaded via a browser solution… but the add-on does work well.

It also automates backups and backup rotation so you get extra bang for the buck from it.

Yes, but you still need to add it, setup the key etc etc. I use the addon myself.

Yeah, literally all of these suggestions require an unnecessary step when compared to other systems. Why should we need to install an addon, just to restore from a snapshot which will - in turn, restore our addons?

3 Likes

Precisely.

Good Feature Request. :+1:

Now that I’m using the Supervised edition, and snapshots, I see the need for this feature in the event I must re-install my system from scratch. The current path for restoring an existing snapshot to a fresh instance of Home Assistant requires too many steps.

3 Likes

I agree, (after I understood what it was about).

However, have you ever seen a feature request be implemented?

This is where feature requests come to die.

1 Like

“Where good ideas come to die.”

In fairness, a few good ideas come to life but I do agree this is where most lie in shallow graves.

Anyway, better to post it here, and hope it inspires a developer to implement it, as opposed to never sharing it all.

3 Likes