Salvaging Z Wave Security Keys from Dead System

I have a Home Assistant system that was running from a USB drive on a Raspberry Pi. It’s been dying in stages. For a good while it wasn’t on my LAN, but it continued to control some Insteon devices. I rebooted it this evening and got a message on the monitor that it wasn’t ready and I needed to run setup. One issue I’ve had is that although I have backed up some files recently by directly accessing the partitions on the USB drive, but my original backups and my notes were on a RAID partition that also went bad. (Both went during a lightning storm a few months ago when I had a number of problems.)

I had 5 Z-Wave touchscreen locks connected to this system and I had the security key info copied to a note file I had in the (now lost) backup. I can get to most files on the physical USB drive that made up this system. Is there some way I can retrieve the Z Wave security key from this system so I can record it somewhere else and use it on a new replacement system?

I’m sure the key isn’t stored in plain text anywhere, but I was hoping it might be stored in an encrypted file that I could copy to the new system, or at least copy the encrypted key info from that file and paste it into the same file on the new HA instance on another Raspberry Pi.

Is there any way to copy this information over to the new system? Even if I can’t get it in human form (for later use), if it’s in a file, I can backup the file. That means I can wait until I have more time to wipe out the locks, factory reset them, and reconnect them from scratch with a new key.

I see this has been here for a while. Are there no answers because I wasn’t clear with what I was asking? Or is this the wrong part of the forum to ask it? Or is this a, “Nobody knows,” kind of thing?

The key is stored somewhere and it is stored in plain text.

In my zwavejs2mqtt setup there is a file called settings.json that contains the keys.

Do you mean a separate zwavejs2mqtt install or part of the install in HA?

And were they labelled, like

key=<some value>

or were they just stored in a file with no indication what they were?

They were called S0 Security Key, S2 security key,etc.

Thanks. That give some something to search for with grep.

Found this useful.

https://thissmart.house/2021/02/04/how-to-retrieve-home-assistant-z-wave-network-key/