Hassio Virtual Box Backups

I have my hassio running on a virtual box ,virtual machine and recently lost 2 months of work. What is the best way to back up my home assistant? Do I need to take hassio snapshots and then also somehow save the virtual machine files? Do the backups need to be performed in a certain order (hassio snapshots first,then virtual files or vice versa) Any assistance knowledge you can provide is greatly appreciated.

I am running Hass.io in virtualbox as well. happy with it.

to back up I make a complete backup from within virtualbox once a month.
If I start tinkering with small things, a snapshot within HASS is sufficient.
If I start changing bigger things, i.e. switching to mqtt, or grafana/influxDB, clone fully up front.

what i do to clone:
log into virtualbox gui. You will see one OS ‘running’
press stop > power off
when it is stopped, rightmouse button on clone.
make sure to disable reinitialize mac adres, make full clone , not linked one.
when its done, start the original VM again.

why I do it like this, and not with snapshots etc.
I have a bad experience with removing old VM-snapshots and getting a non-functioning VM
Cloning takes about 10 minutes in total, which is worth it IMHO.

Hope this helps you.

1 Like

Thanks. So the clone can take the place of the hassio snapshots? I have no problem spending the 10 minutes. Thanks very much

The reason why I don’t use the snapshot function of home assistant itself is that it needs to be up’n’running for it to be able to be restored. (at least that’s my understanding of it)

Had a couple of times an incorrect configuration, resulting in a non-booting home assistant (hassio). Of course this is my own fault in the end. But using an external backup/restore method protects me the best :slight_smile:

Thanks again. I’m in the process of rebuilding my assistant and made my first clone last night. It was painless. Thanks for your knowledge :+1:

Oh, after cloning, you should check if the image is set on auto-start or not.
I run the VM on my NAS. The VirtualBox plugin has the option to tell per image/clone to start manually or automatic.
Set only your current one on automatic.

I think I did but I’ll check it when I get home thanks again!

When I create the clone what do I select for MAC Address Policy,and the Additional Options “Keep Disk Names” and “Keep Hardware UUIDs”

Thanks again for your time.

After cloning, you could check if it went ok.
Just stop your current config.
Start the clone.
Test if you see issues in the logs with USB pass-through or other stuff related to network, all is fine. When checked you can stop that image again and start the current one. :slight_smile:

regards and have fun with the setup :slight_smile:

Hi! Any success with those settings? I have the same question, what to select…

And another question: everytime i update home assistant, i lose everything…do you have the same issue? Thanks

@nontijt Can you be explicit about the settings to use? @atechnical asked a few posts up about the 3 “additional options”. I have the same question.

Sorry guys, I read the posts just now. notification mail ends up in spam-box. my appologies.

I can update Home Assistant normally. No loss of anything. Maybe you have not set a shared folder outside of the VM environment?

I have added screenshots to help.

Just to note:
I am running this Virtualbox plugin on OpenMediaVault 4. This is an opensource Debian NAS thing.
In it, I have created a separate network adress for home assistant.
This way the nas has a different IP than homeassistant has.

Cloning:
These two screens is what I see when I clone, the settings as in the screenshots.
Hope this helps.


I dont get the question about keeping disknames. But from what you wrote, It sounds like I would be saying YES to both those questions.

Hey all, revisiting this clone issue. There are a lot of settings here and i’m not sure which ones to use when cloning my hassio install on ubuntu64:
clone2 clone1
I just want to make sure I get this right when I clone my machine.
Thanks!

I would select:

include all network adapter MAC adresses.

Tick Keep Disk Names
Tick Keep Hardware UUIDs

First part (mac adresses) Virtual box asks this because it fears you will run the clone along side with the original, causing a clash in mac adress. In your case of backup (and disable autostart) this will not be an issue. This method probalby better if you have a router with MAC adress filtering i.e. so you dont have to adapt to the new mac adres.

Second halve, two lines with the ticks befor it, I have never seen those myself. But thinking along the path you just want everything to be identical to the original I would tick these.

I was using a different version to what you are using I guess. I dont see the same questions. So I can’t say for sure. I have switched to Proxmox recently, so I cant test.

Regards,

1 Like

Hi All,

This morning my windows PC had deside to restart and my HA will not get pass this point. :frowning:

I am now trying to start a Clone but I am stuck getting this error.

I cloned using this setup
image

What am I doing wrong? Hope you can help. :slight_smile:

1 Like

@larsbach, did you find a way to boot your clone? I’m having the exact same issue after cloning. :frowning:

@Matthieu No sorry. I have tried 2-3 times but no luck. I am still hoping to get a pointer or 2 to get this working. :slight_smile:
It is on the top of my todo to find a solution to get backup working.

I managed to boot the clone!
When getting the prumpt (Shell>), type “exit”. That brings the boot manager. In the menu I go inside “Boot Manager”, and then select the partition that sounds right (for me it’s named “UEFI VBOX HARDDISK VBbe…”). and voila! it start.

The only issue is that it don’t remenber it, so you need to do like this each time starting the clone. I read in some forum how to make it “permanent”, but I havn’t tried it.
I find it strange that we are the only one with this issue.

1 Like

I was able to get the clone running by following the steps in this link:

2 Likes

I wanted to take a moment to say that I figured out a way to fix this boot order thing.

Use arrow keys to move around and hit enter to select things in the following menus:

  1. Type “exit” at the shell prompt
  2. Select “Boot Maintenance Manager”
  3. Select “Boot Options”
  4. Select “Change Boot Order”
  5. Notice that “UEFI XBOX HARDDISK” is at the bottom of the list. This is why it will not boot.
  6. Hit Enter to select the list to change it
  7. Select UEFI VBOX HARDDISK and press + to move it to the top of the list
  8. Hit Enter when it’s at the top
  9. Notice it is now at the top of the list. Notice menu below for F10=Save
  10. Press F10 to save the config - press Y to confirm to save
  11. Press ESC until you’re out at the top level menu
  12. Select Continue - and it should boot.

It should now boot every time since you changed it to be first in the boot order.

5 Likes