Skip to content

[Rant] Full data loss in case of migration problems due to data storage in RocksDB #8112

Open
@codiflow

Description

@codiflow

As I already mentioned in this issue (#7431) the current way of storing data only in RocksDB increases the possibility of total data loss.

I'll give you an example:

I was using 0.7.6 on macOS for months now and had my data stored locally. Then I added a cloud account and tried to import my Notion stuff. This did not work so I just forgot about it.

Then after a few weeks I started to install 0.9.3 to see if things are working better with this version, but:

After the migration from 0.7.6 to 0.9.3 all local data was GONE.

I have several data folders now and I can clearly identify in which DB folder my data resides but I'm NOT able to access it anymore. I already followed this guide without any success.

Error messages differ, so just some examples I got while trying to recover anything:

  • Can't find the user profile for user id: <REDACTED>, error: DatabaseError(Unknown, "no such column: user_table.workspace")
    => Database layout in flowy-database.db was missing tables

  • {"msg":"[Flutter]: init workspace, current workspace: <REDACTED>, workspaces: (<REDACTED>), isCollabWorkspaceOn: false","time":"07-08 15:44:44","target":"dart_ffi"} 2025-07-08 15:44:44 ERROR flowy_user::event_handler: error: Not support yet to Failed to get workspace usage, error: code: NotSupportYet msg: Not support yet

  • ERROR flowy_folder::manager_init: error: Local version not support

  • ERROR flowy_folder::manager_init: error: code:Not support yet, message:Can not create default folder

  • ERROR flowy_folder::event_handler: error: code:Internal error, message:folder is not initialized

  • ERROR collab_plugins::local_storage::kv::doc: 🔴Insert update failed. Can't find the doc for 478892687370489856-"34de9b49-9412-571b-b474-b530235071d7"

I invested many hours now trying to recover the old database without any success. I was using the initial version 0.7.6 and also the most recent version 0.9.4, I cleanly initialized data folders, changed the IDs to the respective ones from the database whose data I want to access and imported the old database then, I tried to import the data folder within AppFlowy, I created a cloud account and tried to integrate the old database there:

Absolutely NO success with any of these actions.

And as RocksDB stores useless Key-Value pairs which look like this, a RocksDB database dump is completely useless too:

Image

What I want to say here is that the current way AppFlowy stores local data is ‼️ not resilient ‼️ and users relying on local data storage without a manual Markdown export might experience FULL DATA LOSS in case migrations fail.

This definitely should be changed as user data should NEVER be put at risk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions