My .yaml files are missing, HACS doesn't work and more

New to the forum, not new to tech… Really could use some guidance.
I searched google and this forum and found others with similar situation, restarts seemed to help.

  • I can’t find my .yaml files when I drop into CLI
  • HACS gives an error loading integrations, etc.
  • Automations load but, gives error that it can’t find the automations.yaml file.
  • When looking at integrations, the page tries but can’t pull up the log book
    I’m getting a bad feeling that something is wrong. I don’t want to restart HA until I’m sure HA will come back up. I’m not sure if all of my devices (over 270) configured, automations, etc. are running in memory, the the .db or ??
  • The CLI doesn’t find the .yaml files (configuration, etc.) using the find command. I looked in all of the folders manually and didn’t find any file that I’ve edited before.
  • Interestingly, the backups folder still exist and my backups are in there.
    I did full backups on 8/2 and 8/4
  • 8/2 - shows the .yaml files and the system was work correctly.
  • 8/4 - does not show the missing .yaml files, folders are missing but shows a bunch of new folders

After 8/2 I connected attached Windows 11 file explorer via Samba, connected my new Galaxy Watch 7 to HA app, created new Amazon AWS user to set up Amazon Poly, and enabled entity settings.

When I look in each of the new folders, each has a standard list of files. All the files / folders were created at 12:22 AM as if the system was wiped and a new folder set was installed.

Well crud… I just found something that says the Git Pull add on could wipe the config folder, which did happen… I do remember starting the add on when I was trying to pull something off Git… Did I just blow-up my HA config?

ADDED NOTE: I’ve only downloaded from Git with HACS in the past. My Git Hub account doesn’t have any repositories, etc. and shows no activity. I haven’t used HACS to integrate within the last few weeks. So… I don’t think it was the Git Pull addon. What made me think it was the culprit is that I tried to start the add on last night thinking it was for something else.

For those that run into same issue… the below is from the Git pull documentation. I had not entered any credentials, but sure seems I caused the wipe of the config folder by starting this process :face_with_diagonal_mouth:

WARNING

The risk of complete loss is possible. Prior to starting this add-on, ensure a copy of your Home Assistant configuration files exists in the Github repository. Otherwise, your local machine configuration folder will be overwritten with an empty configuration folder and you will need to restore from a backup.

I’m going to restore my 8/2 backup then restart hoping for the best. I just don’t like the idea that it will wipe my system until I know what caused it.

Odd that a pull would nuke everything especially if it has nothing to pull from. Looks like this addon has been doing this behavior for a long time. Another reason why simple isn’t always the best. Learning some basic git on the command line to back up your config really isn’t that hard and there’s always more than one way to make a backup.

Honestly, if your latest backup is 2 days old you haven’t lost anything.

Unfortunately, over the last couple of days, I had enabled a bunch of entities to track, built some new automation along with mods, started configuring for voice and a few other things that now I don’t remember. I did a backup on 8/2 before starting and another on 8/4 after I made a bunch of changes. Apparently, my 8/4 backup was about an hour after the config folder was overwritten.

On another note, I just looked at the influx folder… it’s over 3gb. I need to trim that and take more frequent backups, when I make these kind of changes.

Actually - I need to retire so I have time to configure the darn thing properly and figure-out a way to automate the backup copies to a separate drive.

When I first setup HA, I remember reading a debate about automated backups. To my surprise, there’s an automated action that allows for backups! I just set it up… once I get it working, I’ll automate a copy via Samba to by OneDrive folder. I haven’t checked for an add-on yet… Spent way to much time on HA this weekend! I’ll get back to it.

I hope all this helps someone else that gets in the same situation.

PS… I wasn’t using Git pull for a backup but misunderstood a post when I was researching how to pull an author’s project files into a folder so I can customize. Like anything else, I get better by doing it the wrong or hard way.

If you can mount a samba share why not just sync it locally or to another drive? Rclone to a usb drive? or a million other ways.

Yup… exactly what I’m doing. I didn’t start using Samba in this instance until yesterday. Like I mentioned before… I get better doing it a few different wrong ways. When younger, I did it the hard way on purpose so I can understand it better… even helped me enhance whatever the project was… I still like doing that but, just don’t have the time like I used to.

Not sure if this will work - but if you load the 8/4 backup (or before you restored) whether you can go into the automations you changed and copy the text by viewing the yaml in GUI so you can do a manual backup of those additional automations? For the lovelace you should be able to view the raw configuration and do the same. Obviously if you restore it you’ll have to have the same integration/entities available to save it but one less thing to do.

I wish I had read this prior to restoring as I can’t remember what I tried, when I looked at the automations. I do remember seeing errors but should’ve dug deeper.

If I had the time, I would break it again (on a test system) and try this and some other options so I can better understand it.

Thank you for the response

There’s a nice add-on, that is (not only from me) highly recommend here in this forum:

It is very well coded and supported. I personally am using it for years, and it has worked without any problem! And yes, i have tested the backups that were uploaded. :joy: