How to backup just my map zones from older install

Not sure if this is the right place, but I have a 2 year old install of HA and it works fine, but is very outdated. I just did a new install today of 2023.1 and the main thing I miss so far is all of my zone areas that I have made over the last 2 years. Is there a way to do just a partial backup of my old system for the zones or am I out of luck. Currently I have both versions on the same laptop running windows 10 using a VirtualBox. I have not set up device tracking yet on the new install, but maybe that will bring them across. I have never done a backup on my old install. I am logging in with different credentials on the 2 installs. Would changing new credentials to old one help? I was hoping to maybe copy and paste a config file locally from my laptop, but I’m sure it’s not quite that easy :slight_smile:

Brian

No.

No it wont.

No

It is and it isn’t that easy.

The zones are stored in the config./storage folder. Somewhere. They could be part of a much larger file. I don’t have access to my system until later tonight to check. It would be a simple matter of finding this json data in the old system and merging it with the file on the new system.

Be very careful editing these files. Back the files up (copy them elsewhere or rename a copy_bkp) and have access to the file system to replace them (via SAMBA or SSH) before mucking around with them. You have the potential to severely break your system with one out of place comma.

Thank you so much for the individual answers, very helpful. Most people don’t take the time to answer ALL parts of the question. Much appreciated. I have dealt with json files in the past and I will definitely be careful editing these files. I am at work now but I can remote in to my home computer to search if necessary. I do have ssh installed on new install but not on old one, I believe. Have not used SAMBA yet. On the bright side, if I hose my fresh install, it’s only a day old and I can restart without much remorse :slight_smile:

Brian

OK, making some progress. Got Samba installed on new instance. Was able to finally get to config/.storage and found the zone file. Opened it up in notepad and found the 1 new zone that I made on new instance so that tells me that it is the right file. Now hopefully I will figure out how to the same thing in the old instance, verify the zone file is what I want by opening it up in notepad, and then copy and pasting it into new file. Possibly merging since there is not much in new file.

Brian

So the zones have their own file. Then the easy way would be to just copy that whole thing over to the new system then recreate the one zone it overwrote.

The problem is that the supervisor tab no longer works in 2021 version and cant figure out how to get samba installed yet. Trying to get to the addons. I have HACS installed, but still can’t figure it out. Hard to remote through my phone to home computer, kind of a pain, but at least an option.

Brian

HACS does not include add-ons. Just third party integrations and frontend resources (cards and themes).

For add-ons go to Settings → Add-ons.

The newer 2023 version has that, but the older version does not have settings→Addons. It has the settings gear icon, but is labeled configuration, but no addons in there. For about the last hour I have been trying to dig around and find the addons as you suggest. I think I can add a separate repository for samba if I can get the link. If I get Samba on 2021 version I may be able to get into folders. My 2021 version, however, is using a duck DNS address, so that may further complicate things.

Brian

Still no resolve. Talked with a few people on discord after work and most of what they advised involved going to the supervisor tab (which doesn’t work). I needed that tab for backups, snapshots and other things they advised, so no luck there. What they did tell me to do was to go to my virtualbox and do a snapshot there, so I do have that now. I do have ssh terminal on my 2021 install. Would it be possible to see the file in terminal by using a command something like:

ha --raw-json of the zone file to see it and then be able to copy and pasted to a new json file from the terminal?
I, obviously, am not too familiar with the ssh terminal and don’t want to fool around too much on my own and mess something up. Any advice welcome. All this to extract 1 file :slight_smile: On a positive note, I do like the refresh on the UI on the 2023 version of HA and can’t wait to use it every day after I get my zones file.

Brian

If you have SSH use WinSCP to copy the file off the system.

Hope is still alive !! Now I just have to learn the syntax on WINSCP !! Let me get to reading

Brian

Once again a roadblock, I’m sure because of my pure ignorance. Got WINSCP installed on host machine and tried to login to vm. Using ipconfig i found my vm ip was 192.168.56.1. On WINSCP i tried to login to a new site using that ip. Then it wanted a user name and password. I dont think i have one for my virtual machine and if I do, I do not remember it. I put in the login and password of my 2021 vm and hit login, but got an error saying the server rejected the SFTP connection but it listens for FTP connections. So I changed to FTP using same login info and then got an error saying No connection could be made because the target machine actively refused it. I tried anonymous as well and no luck. I will continue reading unless someone else has any other suggestions.

Brian

Use the credentials you use for logging in via ssh.

For SSH i don’t login, per se. It is on the left bar in HA and I just click it. I was trying to use my login credentials of my 2021 HA install to get WINSCP going. Do you know Tom if it should be SFTP or FTP?

Brian

Well, thank you so much for the help tom. After much frustration, I have decided to copy and paste about 150 zones from the 2021 to the 2023 install. This includes lat, lon, radius, names, and markers for everyone of them. Considering how many I have done do far, it will take about 3 hours to get them all. In the process I have learned a few things which is always a goal of mine. It would have been so much easier to just copy and paste the file, but oh well, I failed. Now that I have the new install I can actually do backups and such so that I hopefully won’t run into anything like this again. Also I need to learn to upgrade more frequently. Lessons learned.

Brian

For anyone who is stumbling about this:

The Storagelocation is:

/config/.storage/zone