Nullboard backups

Nullboard stores all its data in the browser's internal storage called localStorage.

LocalStorage is readily available and it is dead simple to use, but it comes with a risk of being inadvertently purged when the browser temporary data is manually cleared.

Also, it is often desirable to keep an off-browser copy of Nullboard contents to protect against other loss and corruption risks, just as it's done with other types of valuable data.

Backups

Nullboard can be set up to automatically send a copy of a board to the secondary storage when the board is modified.
Once enabled, the top-right menu symbol changes to reflect the state of the backups.
If Nullboard runs into a backup error, it will keep retrying on every board change and with every page reload. Once the backup goes through, all pending backups across all boards will be run as well.

Local backups

When used on Windows, Nullboard can make backups to a local disk, storing each board revision in a separate file in the user profile.

As it is generally impossible for an in-browser code to work with local files directly, Nullboard employs the help a small companion program called Nullboard Agent to do it on its behalf.

The Agent lives in the system tray, listens to the Nullboard backup requests and takes care of saving backups to the disk.
Nullboard talks to the Agent using the standard web protocol, HTTP, so from its perspective backing up is a simple matter of issuing requests to a local web server.

Setting up a local backup involves downloading and running the agent and then "pairing" it with the Nullboard instance using an Access Token.
The setup process is described in more detail below.

Remote backups

Nullboard can also be set up to send the backups to a remote web server. Internally it works exactly the same way except that the backup request is issued against a user-specified server rather than the localhost.

Setting up a remote backup involves installing a server component and then pairing it with Nullboard with an Access Token.

Nullboard support is already in place and the server component is planned.

The backup protocol is very simple and comprises just 3 request types. See checkStatus, saveConfig, saveBoard and nukeBoard methods of SimpleBackup class in the source code for details.

Setting up local backups

That's it.

At this point you will already have all boards backed up and stored locally in %LocalAppData%\Nullboard folder.

You can quickly get to this folder using the tray menu:
Folder contents will look something like this:
For every board there will be a subfolder named with its internal ID, e.g. 1618401166671.

In that subfolder there'll be meta.json file that contains current board revision and its undo history and one or more rev-00000xxx.nbx files with the actual board data.

These .nbx files are the same as those created by the "Export board..." function and they can be imported the same way. The xxx part of the file name is board's revision.

At the root of the folder there will also be app-config.json file that contains general Nullboard settings.

Finally, when a board is deleted, its folder is moved to %LocalAppData%\Nullboard\$DeletedBoards folder and kept there until manually deleted.