New .storage folder, should it be backed up?

I notice the entity_registry moved into .storage with the 0.77.2 release.
I know we are not meant to customize these files anymore like we were doing to entity_registry.yaml for name changes but my questions is when backing up the .homeassistant configuration is it a good idea to backup this folder or should it be excluded because it will simply rebuild itself?

Backup everything, then if you need to rebuild all you have to do is copy it all back in.

Don’t commit it to GitHub though :wink:

2 Likes

Yes, auth, config entries, entity registry, device registry and other things are stored there.

1 Like

Or use git-crypt :slight_smile:

I haven’t made the jump to 0.77.x yet, I have some unanswered questions about it which make me uncomfortable going forward without answers to and I see a lot of people having (real or perceived) issues with the new security, as well as many uncertainties raised like in this thread. I’m just waiting for some dust to settle.

However, one of my questions is about snapshots. Is a hassio snapshot still a FULL and COMPLETE snapshot of the ENTIRE system, as it is now? i.e Is that all you need to restore a system from scratch to exactly the state it was in when the snapshot was made?

This thread seems to imply not.

If hassio backups the full configuration folder then all files should be covered.

A significant portion of the community don’t use hassio, so manage our own ‘snapshot’ facility :wink:

Yes I understand that not everyone uses hassio, but nowhere have I read ‘officially’ that this is an extra step needed to keep the hassio snapshots useful (or maybe I should say, as useful as they are now!).

Now that I do know, I am more than happy to add that folder to my existing automated backup facility which saves to my hassio Pi, my Local PC and to my OneDrive.

It’s just a shame it doesn’t seem to be documented anywhere. Unless, and I’ve just thought of this as I’m typing, it is as the OP said and:

As is so often the case with HA it is what you don’t know that you don’t know that can be the most useful and/or interesting.:stuck_out_tongue_winking_eye:

I think you misunderstood me.

I meant that the OP is probably not using hassio (especially given that he said .homeassistant for his configuration directory, rather than /config) so needs to resolve backups himself.

As I understand it hassio’s snapshot facility indeed backs up everything, including your addons.

But I don’t use it so it would be down to the hassio users to establish what they are backing up (or not, as the case may be) and make some useful suggestions to the devs if something isn’t backed up that should be.

1 Like

@anon43302295 is correct I do not use hassio. I tried to post the following reply to you yesterday but just as I did the community site went offline. That has been happening a lot to me the last few days.

———————-

@klogg I don’t think this thread implies anything about hassio snapshots. I am on a hassbian install and don’t use hassio.

I pulled the trigger on the upgrade after making an image of my ssd drive and it went smoothly. The onboarding triggered and set me up with a new user I’d and password. The name changes I made in entities.yaml moved over to the new entities storage.

Listen to the podcast about the release it explained a lot!

To the devs behind this release! Congratulations on a great update! Didn’t break anything on my system.

1 Like

and @anon43302295

My mistake and my misunderstanding.

I mistakenly assumed hassio for which I apologise, and my misunderstanding because I thought snapshots were an HA thing not just for hassio.

I think we hassio people live in a bit of an HA bubble :slight_smile:

1 Like

@klogg I do think the question still applies to you. In fact it would be interesting to know if the hassio snapshot does include the directory. If it does that confirms the devs felt it needed to be backed up. If it does not then we don’t know still, might be intentionally left out might be overlooked.

I figure it can’t hurt to include for now but definitive answer from a dev involved in the change would be helpful.

There are multiple files used for multiple purposes in that folder. For instance, core.entity_registry replaces the old entity_registry.yaml. If you lose this file then any descriptive name to gave to your devices will be lost. I know because I managed to mess up an upgrade and lose the content of that file. Luckily, I had a backup because I backup the whole configuration directory. If you lose the core.entity_registry file, HA will create a new one, so it will be “rebuilt”, but it will be filled with default values.

I backup the whole configuration folder.

1 Like

According to the source code, they do a snapshot of FOLDER_HOMEASSISTANT = ‘homeassistant’ so that would cover .storage. I don’t think they ever designed the system to only backup specific files rather than folders, since home assistant is supposed to be able to be migrated just with its own config folder.

1 Like