Z-Wave Integration - what files do I need to copy to save all objects?

I have an instance of HA that I’ve just installed and am having a few issues. As part of troubleshooting, I’d like to just put a new SD card in the RPi it’s running on. The only thing I’ve done on that instance is to rename all the previously existing Z-Wave devices. I have backups on a Samba partition.

This system has a Z-stick 700 from Aeotec and was set up with over 25 Z-Wave devices on it for another system, so the Z-stick has all the devices on it. When I installed the current instance of HA on it, it saw all the devices, but, of course, without their friendly names. I had to go through the building and turn all the switches on and off and look for what they controlled to work out all the names.

I see the Devices file in the configuration backups. If I setup a new instance of HA, is that the only file I need to copy over to preserve the names I’ve created for all the Z-Wave devices, or do I need to include others to prevent issues with configuration or linking to device names or anything else like that?

Copy off the entire config directory including the hidden .storage directory. Or use HA backup/restore

Good point about .storage!

I don’t want to copy the entire config directory because I have a thing or two that is not working properly and if I can restore all the Z-Wave device names quickly and easily, then it’s easier to start with a new system (at this point) than to continue to fix what’s not working. So I really just wanted to keep the Z-Wave config from the original and not other stuff.

More detail: The issue is the Remote Home Assistant integration, that’s a custom component. I’m having trouble with that and it doesn’t seem to be easily deletable - tried a few times. So I want to make sure that there is NO info left for it at all on my system. I figure I can delete the directory, but I don’t know if there are pointers to or anything else stored elsewhere on the system.

That is going to be a little more complicated as it will require manually editing some of the files in .storage to remove everything not zwave related.

So is it possible to just copy over the Z-Wave files only?

It is not as there are no zwave files. There is a file with all the entities and a file with all the integrations configuration. So all the zwave and other entities are mixed together.

Ah! Thank you. I’ve done searches, on and off, while working on different things, and have been trying to where various configuration files go. When I’ve asked about them, nobody’s answered. You’ve just clarified that for me with that one statement. I take it, then that everything is in home-assistant_v2.db? If so, what format is that in? I tried loading it with a data browser for SQLite files, but it wouldn’t load.

I’m using the add-on for making a Samba share on my Pi running HA, but also using Samba backup, which creates the archive files with many files in each one. So, I take it, the Samba backup creates the files so it’s possible to pick and choose which files to load back into the DB? Or have you worked with that?

That file is a sql lite database for the recorder (e.g. history charts).

The configuration files for integrations and entities are in the .storage directory. They are json text files.

Ah - okay. You did mention that directory, but I forgot to go through it to look at config files. Thank you. I’m going to go through there to examine files and see what I can learn.

Are you familiar with Samba Backup? Do you know just what it is it is doing? From what you said, I figure it’s dumping the json and SQLite data into distinct files, instead of just doing a recursive copy or using rsync to copy over the config directory tree to a backup share.