Can you fetch running config from memory?

I was editing sitemap via SCP, and something happened, like communication network issue, and he zeroed it out. now the file is 0kb.
sitemap still works, but after i restart the openhab service it will be gone. disaster
is there any way to get it from running memory?
i know, i know…backup,backup…unfortunately, old backup before many changes were done.

i took screenshots of all parts of sitemap, so i can rebuild it manually, hoping for a better idea :slight_smile:

There is no way to get back to the original .sitemap file contents that I know of. But first see if the editor you were using saved a backup when you opened the file. These are usually hidden files (i.e. their name starts with a .). You can see them with ls -a.

If not backup file was created you are probably out of luck.

You might be able to get a a JSON representation of the sitemap through the API Explorer (under Developer Tools) but you’d have to translate that into actual sitemap syntax. It’d probably be easier just to recreate it from scratch.

thanks! lesson learned. no hidden file…it was an android client…

edit: luckily i pasted it in some thread here, so at least i have some old backup, dont have to rebuild from scratch :slight_smile: