Focalboard: Recovery of (accidentally) deleted board

Hi Frewun and welcome to the Mattermost forums!

First of all, please make an offline copy of your Focalboard.db and store it in a safe place, just in case we ruin something by trying to recreate your data.
As you could already see, the data is still there and it’s only soft-deleted, but I’m not aware of an easy way to just undo the last step, but if you remember when you deleted the board, it should be easy to restore the data.
When you open the Focalboard.db file with an sqlite editor (I’m using sqlite3 here on Linux), you can toggle the output mode to see also the column headings and when doing that, you will see that there is an attribute called delete_at. This indicates a timestamp of deletion in the unix timestamp format (microseconds since 1970). So let’s say you deleted the board 24hrs ago, then you would find out the unix timestamp of this very minute and subtract 86400 seconds from it and this would be the starting time of your delete action (add three zeros at the end, because we’re in microseconds here).

Example:At the time of this writing, the unix timestamp is 1659556805, so yesterday at the same time would be 1659556805 - 86400 = 1659470405 * 1000 (because we need microseconds) = 1659470405000.

In the sqlite browser, you can then search for all the data deleted after this specific point in time, by running queries like:

SELECT * FROM blocks where delete_at > 1659470405000;

You will then see lots of data being displayed and if this is the data you’re interested in, you can proceed with bringing it back to life by just setting the delete_at attribute to 0 (which means, it never has been deleted).
Do do that, run the following query:

UPDATE blocks set delete_at=0 WHERE delete_at > 1659470405000;

The following tables in the Focalboard.db database have a delete_at column, you’d have to do that for all of them (not just the table blocks as in my example above):

  • blocks_history
  • users
  • blocks
  • subscriptions
  • file_info

Let me know if that helped!