How to backup lovelace?

Hi All,

I love the new lovelace and I like being able to customize the UI in place without necessarily having to write some yaml.
One thing I can’t figure out though is what’s the best way to back up my Lovelace config? it seems that since I am no longer using the yaml based config, then the changes I make aren;t as easily backup-able…
Thoughts?

Snapshots do backup the .storage folder (where the Lovelace config is stored).

3 Likes

Oh great to hear. Thanks

You can always also go to the raw editor and cut/paste the contents to a text file which you can always copy back.

1 Like

where is the storage folder located on hassbian?

1 Like

its a hidden folder inside config

probably

/home/homeassistant/.homeassistant/.storage based on the documentation for hassbian where the configuration is stored.

1 Like

I just came across the file /config/.storage/lovelace in Configurator which contains all the Lovelace configuration. Although when I updated something, saved and restarted, it still didn’t reflect on the UI. It only seems to update from the UI config.

Correction, it updates fine. Just took a very very long time to restart for me.

I use a git repo for my config backups, but right now I’ve already got the .storage folder in my .gitignore

I’m about to ‘take control’ of my lovelace UI, so need someway of backing up and changing my lovelace config, looks like I may need to tinker with the .gitignore

Is there a way now I’ve ‘taken control’ of my UI config to have the lovelace folder outside of the hidden .storage folder?

No.

Just make a copy of of the entire folder and contents to back it up if not using snapshots.

I prefer git version control over snapshots myself, so i’ll stick with that thanks. :slight_smile: Also I don’t have the snapshots feature as I’m running HAC.

It does seem odd that all the other config files we need to tinker with are in the main /config folder, the the lovelace file is in some hidden .storage folder, I guess there’s a reason for that but I have no idea what it is!

There are some libraries/unnoffical-add-ons that allow you to transfer snapshots using scp over ssh to a server.

1 Like

Thanks, it’s nice to know there are other options out there. :slight_smile:

I’ve sort of got it working, here’s the part of my .gitignore file for anyone using git for their config:

.storage/*
!storage/lovelace

I just need to be sure to git push from the machine running HAC after using the GUI editor otherwise things get can get of sync, plus VSCodium doesn’t seem to be able to find the hidden .storage folder, but I should be able to work around these issues.

There’s also add-ons that do google drop box. Seems like a waste of time getting it to work with git. I only use git to store revisions of my config to share with people. Otherwise I have backups in multiple spots.

There are other files in the .storage directory. Are any of those important to backup along with “lovelace?” I’ve actually had a couple of cases in the past where I had to rebuild my HA system from scratch (for example, when the SD card in my Raspberry Pi went bad). In those instances it was relatively easy to do because I had saved copies of all .yaml files. What do I need to save now?

Just make a snapshot. No need to save any files other than the snapshot.

I’m not familiar with snapshots. Some googling seems to say that it’s a feature of Hass.io, but I’m not using that. Is there another way to get snapshots?

Nope, you need the supervisor. Your only option is to backup the entirety of the config folder.

Thanks. My home-assistant_v2.db is the largest file in that directory. Does it need to be backed up?
I also don’t think I need to backup the home-assistant.log file.

Maybe a useful enhancement to consider would be put files that need backing up in one directory and files don’t need backup (like log files) in another.