Rules and ECMAScript in OH3

Having recently upgraded from OH2.5 to OH3 I have now created my first rule using the GUI, selecting and writing an ECMAScript. Can anyone tell me how/where these are stored within openhab? Previously I have only created .rules files and maintain these in a git repo. If they are stored as files somewhere under the openhab directory then I must have missed them when searching for them. Maybe they are stored within some form of database managed by openhab?

They are JSON and are here: /var/lib/openhab/jsondb

If you want to back them up run for example:
sudo openhab-cli backup ~/openhab3.zip

That’s excellent, thank you very much :smiley: