Backup option in the Data Workspace? 😉 That .bak file is usually generated when you modify the structure of a table. You may just be able rename it to .dbf and life can go on. Of course, any changes to the data and structure since the .bak was created will be lost.
When you alter a js file in your App and save it, the previous version is saved in Lianja\apps\appname\year\month\day\time. This can then be accessed from the Versions Workspace via the date hierarchy and restored if required. Are you not seeing an earlier version of your js file? Was it edited outside Lianja?
From the Apps and Pages Workspace, you can revert to the previously (last) saved version of the App you are working on (Pages WS) or the script you currently have open (Apps WS).