Regarding Backups if we run HA in a VM

Okay, so for the longest time I’ve been using the backup feature in HA to generate small backups of the system any time I upgrade or update a feature, and a full backup every night.

A full backup is approximately 1.3G.

The VDisk for my HA Virtual Machine in Unraid is 32G.

It seems more efficient to backup just the *.tar files that HA creates rather than backing up the entire 32G Vdisk, since it’s not actually 32G of data.

1st Question

IF I backup the Vdisk file /mnt/user/domains/home_assistant/haos_ova-9.5 am I actually backing up my entire config such that I could restore that file and be back up and running?

2nd Question

Is there a way to manage backup retention in HA for the *.tar files that it creates, or do I need to run a script on my Unraid box to manage those files?

Thanks!

I do both. I back up my virtual machine in its entirety nightly and I get nightly backups from HA sent over Samba to a totally different machine using the Samba Backup add-on which does manage retention.

And yes, you can just copy your old VM in place of what’s there and be fully restored quickly. I do this before I move to any new month install since it could have all sorts of changes that could still be around if I downgrade.

I’m thinking a bit the other way around… Since I have full Proxmox backups, what do I need HA extra inner backups for? Nothing, I guess… I may skip the HA backups?

Take it from an IT professional…there’s no such thing as too many backups…

2 Likes

I do two every night, one form Home Assistant and one from Samba Backup. I may add Google Backup soon for offsite backup.

1 Like

The reason I ask is because my AWS S3 account costs went up recently because of the size of files that I have, so I’m paring down to the minimum backup that I need to get back up and running.

I currently backup the VM image, use Samba Backup inside of HA for full and partial backups, and they all get dumped to Unraid.

From there, I’m running MSP360 to manage backups to my S3 buckets. I have plenty of redundancy, but I prefer backing up the critical parts of an image rather than the entire image because it seems to backup the full intended size of the Vdisk even if there isn’t that much data.

THE absolute most important data I have is our family media and Vaultwarden…everything else simply becomes a minor inconvenience if total loss occurs.

This.

I consider HA the brain of my home, and as such it’s the most important thing for me to keep operational. It’s not just the cool bells and whistles, but massive time, effort and expense that went into making that brain what it is today.

2 Likes

The more important backup should be the HA one. With that, you can always do a restore on any platform HA is running on.

With a backup of a VM it’s not nearly as flexible as a HA backup.

Let’s say your homeserver exploded (just kidding :rofl:) and you want HA as an essential tool in your house to come back to life really soon. What alternatives do you have at hand? Maybe a Pi, or some old Laptop, maybe an old desktop PC - all these would be much harder to get a VM backup restored. Where the HA backup is running in around half an hour with a standard installation.

HA is one of the very few applications, where I do backups internally (as in HA backup) and not with any kind of script like Borgmatic. All other things like Nextcloud, Media Servers or even my laptop get backed up into the cloud as full backups. HA I safe locally on a network drive and with the very good and useful GoogleDriveBackup add-on to a GoogleDrive.

So depending on how much you need or want HA be back up and running you should have a HA backup in any case. Backing up the VM additionally can’t hurt, but the HA backup is the one you should care about most! :slight_smile:

Not only that but it is a lot easier to recover partial config from HA backups if for example you accidentally deleted a complex automation you later realise you do actually need. No need to spin up a full VM just open the tar files, copy the bit of config you need and past it into your running config.

I did this last year to recover a template sensor I no longer needed then a month later actually did need again. Luckily it was right on the limit of my SAMBA backup retention too (30 days).

1 Like

So I this is what I’m doing now.

Every night, I take a full backup of HA using Samba Backup.
Every two hours I create a backup of Vaultwarden (running as an add-on in HA), triggered by NodeRED. I want to make sure any credential changes only have a 2 hour window for modifications.

Those backups are dumped to a share on Unraid (mapped backup folder in HA.)

Every night, a docker container running MSP360 Backup runs a backup routine and that folder is included, and it’s offloaded to AWS S3.

Another backup routine grabs all of the important VM and docker settings and images on Unraid and dumps them at AWS S3 also, into a different bucket.

Retention is set to a relatively short period of time to keep AWS storage costs low (using standard storage for this type of thing.)

I think I’m pretty much covered.

The only hiccup in the entire process now is that I still don’t think HA has a progress indicator for restoring backup archives.