Micro:Bit project backup?

According to what I read in The Official BBC Micro:bit User Guide (Halfacree), if you Clear History in you browser, you lose all your projects, and using the Save function is an option. So I went to a “different PC” to explore this. I made a simple project using Firefox. Then went to Tools/Settings/Privacy & Security/History/Clear When Firefox Closes. I closed & reopened Firefox, but found my project was still there. Did I misunderstand?
I next wanted to test the Save feature as a safer backup. When I click the Save button, it asks where I want to save the Hex file, just like it does when I click Download. I always understood that there is no way to start with the Hex file and recreate your Block/Javascript project. Am I wrong? If not, how does saving the Hex file help me preserve my project’s “source code”?
TIA
Don

I think if you are signed in, it’ll save projects in the cloud for you and they’ll be accessible as long as you’re signed in. There’s button in the top right to sign in or, if you are signed in, a button for a user settings menu that allows you to sign out. More details about Sign in / accounts is at: https://arcade.makecode.com/identity/sign-in.

If you are not signed in, I think it saves them to the computer’s local cache. I’m not sure if the cache is cleared in the same way as the history, but it may not be. To confirm how you clear them you may want to try:

  1. Be sure you are not signed in (if there’s not a “Sign In” button, click on the button in the top right and sign out).
  2. Create a project.
  3. Close the tab with the project.
  4. Clear the cache: https://support.mozilla.org/en-US/kb/how-clear-firefox-cache .
  5. Go back to MakeCode and see if the project is still there.

If you save to a local file (the .hex file) it can be imported into MakeCode. See: https://support.microbit.org/support/solutions/articles/19000065686-how-do-i-import-my-editor-scripts-and-hex-files- (it uses the drag-and-drop method. There’s also an import button in MakeCode’s “Home” section)

Hex files can be restored. Another common request is to restore code from an already-programmed micro:bit, but there’s not really a way to retrieve the original source code from a micro:bit.

I hope that helps!

1 Like

Ah, it may actually be the individual site storage, which is different from the cache. Maybe: https://support.mozilla.org/en-US/kb/storage .

1 Like

@bsiever we store projects inside of IndexedDb, which I think does generally fall into “site data” in most browsers’ terminology.

@Don23805 As for making backups, you can indeed recreate your project using a hex file. Just drag it into the editor window and MakeCode will import it as a new project.

If you want to back up multiple projects at once, you can save multiple projects as a zip file! See this GIF:

save-as-zip

Once you have the zip file, you can re-import all of these projects at once by dragging the zip file into the editor just like you would import a hex file.

1 Like

Thanx for the info on backups. Somehow the forum software changed me to not get notifications of replies. It also said that my post needed approval, but never let me know that it had gone thru.
Especialy pleased to find that just dragging a hex file (under my control; not microsoft or firefox)to the workspac will actually recreate the entire project.
Don central VA

1 Like