[Bug] data lost after launching 0.9.0
Bug Description
After opening new version, in data folder new fodler created 453927902086434816, but old fodler was 347750474297905152. Can not use my data, looks I lost it. help to resolve it please
How to Reproduce
use new version
Expected Behavior
open existing data
Operating System
ubuntu 24.10
AppFlowy Version(s)
0.9.0
Screenshots
No response
Additional Context
No response
Same. I am unable to import data from the existing AppFlowy data directory and when trying to switch the data directory, it creates two directories called AppFlowyDataDoNotRename and AppFlowyDataDoNotRename_beta.appflowy.cloud
same problem
Got the same behavior. I'd suggest to backup your data directory immediately just in case. I don't believe your data is lost (yet).
We're looking into this issue. As long as you have these data folders, your data is safe and can be recovered.
⚠ Do not try this until asked by developers!!! ⚠
@annieappflowy FYI, I was able got get access to my data once by switching to Local in the Cloud Settings and restarting the app (on MacOS). Though, cannot reproduce it again after restoring from backup.
@jay7x Thanks. I will try to reproduce
⚠ Do not try this until asked by developers!!! ⚠
@appflowy reproduced! See the steps below.
NOTES:
- I'm only using AppFlowy in Local mode
- I have AppFlowy data in non-default location, so that might be somehow change the process.
- I'm not responsible for any data loss caused by following the steps below :)
Steps:
- Starting with "Welcome to AppFlowy" page with default settings ("Cloud Settings" set to "AppFlowy Cloud")
- Continue in "Anonymous mode". Should see the "Getting Started" page.
- Go to Settings -> Manage data -> Reset "File storage location" to default.
- Quit AppFlowy and restore original (not default) data dir from backup.
- Start AppFlowy. Should see the "Getting Started" page again.
- Go to Settings -> Manage data -> Import data and import data from the original data dir. AppFlowy should say that data was imported successfully, but shows no data (still "Getting Started" page only)
- Go to Settings -> Cloud Settings and change Cloud Server to Local. Press "Restart". You should see an empty page with field to set the data path.
- Set the data path to the original data directory. Quit AppFlowy.
- Start AppFlowy. Now you should see your original data. Also File storage location should be set to the original dir (
349...in my case).
already tried it, it always fails. tried to import for root fodler of data folder, also from AppFlowyDataDoNotRename and also from 347750474297905152, all fails
also tried suggested by @jay7x, cannot restore data
@alyvusal Did you backup your original data?
@alyvusal Did you backup your original data?
yes fortunately, my data folder name inside AppFlowyDataDoNotRename fodler is 347750474297905152, but app creates new one
We've addressed the issue and will release version v0.9.1.
If you have the original data folder 347750474297905152 and the cache.db file, we can help you recover your data. By the way, could you share your cache.db file with me so I can check the session key inside it? @alyvusal
Could you compress your data folder and email it to me([email protected])? I'll modify the cache.db file and send it back.
data folder contains sensitive data, cache.db attached already (deleted attached file after restore was successfull) I tried to restore from session backup table but not worked.
After opening and closing many times, try restore, this time opened new UI and showed to use anonymous mode. I imported from that windows and set my data folder, now it is ok, I see my data. But I did not got how this resolved
same problem, following
did not observe this issue on 0.9.1
For users who are affected by this issue, install version 0.9.1, then execute the following SQL script on cache.db (directly under the data folder, which should be in the form of <data_......>, before running the application.
UPDATE kv_table
SET value = (
SELECT json_object(
'user_id', json_extract(b.value, '$.user_id'),
'user_uuid', json_extract(b.value, '$.user_uuid'),
'workspace_id', json_extract(b.value, '$.user_workspace.id')
)
FROM kv_table AS b
WHERE b.key = 'session_cache_key_backup'
)
WHERE key IN ('appflowy_session_cache', 'anon_user');
This database is in sqlite3 format. So you will need to install sqlite3, before you can run the above script, either using the command line (run sqlite3 cache.db in the terminal, after navigating to the directory) or some graphical tools for sqlite3.
Once the change has been executed, verify that the database row has been updated. Then run AppFlowy 0.9.1.
Could you compress your data folder and email it to me([email protected])? I'll modify the cache.db file and send it back.
Please help me! I lost data also. I have sent an email to you. I hope for your replay.
How to recover my data! I updated 0.9.1, still show me a new workspace.
In the meantime if you can restore to 0.8.8-1 and restore your app settings folder and database folder. That is what I did to get back my notes. The solution @khorshuheng posted did not work for me...
How to recover my data! I updated 0.9.1, still show me a new workspace.
If you have upgraded to 0.9.0 before, you need to follow this guide to restore your data, on top of downloading 0.9.1:
https://github.com/AppFlowy-IO/AppFlowy/issues/7872#issuecomment-2847238877
In the meantime if you can restore to 0.8.8-1 and restore your app settings folder and database folder. That is what I did to get back my notes. The solution @khorshuheng posted did not work for me...
Are there any issue if you upgrade from 0.8.8-1 to 0.9.1 directly? (Just in case, keep a backup of the entire data directory)
Unfortunately yes same issues...
Upgrading appflowy-bin (0.8.8-1 -> 0.9.0-1)...
Running post-transaction hooks...
Arming ConditionNeedsUpdate...
Updating icon theme caches...
Updating the desktop file MIME type cache...
Transaction successfully finished.
Had to restore to 0.8.8-1.
And after doing that I had to remove then replace both folders for the app's settings and database. So a complete restore. Else same issue....I guess the new versions of the app are modifying files in both the storage folder and the app settings.
Unfortunately yes same issues...
Upgrading appflowy-bin (0.8.8-1 -> 0.9.0-1)... Running post-transaction hooks... Arming ConditionNeedsUpdate... Updating icon theme caches... Updating the desktop file MIME type cache... Transaction successfully finished.Had to restore to 0.8.8-1.
And after doing that I had to remove then replace both folders for the app's settings and database. So a complete restore. Else same issue....I guess the new versions of the app are modifying files in both the storage folder and the app settings.
Upgrading from 0.8.x to 0.9.0 does cause this issue, and can only be fixed by upgrading to 0.9.1 and also execute the SQL script above before launching 0.9.1.
0.8.x to be 0.9.1 (not 0.9.0) direct upgrade should be fine, however, without the need of executing the SQL script. If that is not the case, do let us know.
Upgrading from 0.8.x to 0.9.0 does cause this issue, and can only be fixed by upgrading to 0.9.1 and also execute the SQL script above before launching 0.9.1.
I see, I may give that another try. Do you think this can be fixed upstream and we can upgrade without having to manually do this database tweak? I suppose most users of this app will be very confused by manually having to fix the database.
Upgrading from 0.8.x to 0.9.0 does cause this issue, and can only be fixed by upgrading to 0.9.1 and also execute the SQL script above before launching 0.9.1.
I see, I may give that another try. Do you think this can be fixed upstream and we can upgrade without having to manually do this database tweak? I suppose most users of this app will be very confused by manually having to fix the database.
That's true, though at the same time, we have not been able to find a good way to do so. (Eg. The script above should not be executed for users who upgrade directly from 0.8.x to 0.9.1. Also not applicable for users who don't use anonymous mode) If we are able to, we will include this upstream. For the time being, do give the above SQL script a try. And for users who are still not able to fix this, they can send their data directory (or just cache.db, which doesn't contain the actual data) to us.
How to recover my data! I updated 0.9.1, still show me a new workspace.
If you have upgraded to 0.9.0 before, you need to follow this guide to restore your data, on top of downloading 0.9.1:
which cache
How to recover my data! I updated 0.9.1, still show me a new workspace.
If you have upgraded to 0.9.0 before, you need to follow this guide to restore your data, on top of downloading 0.9.1:
It must be first launch 0.9.1 ? I had already launched 0.9.1 and generate new data fold, which cache.db file should be use d to execute sql.
The cache.db that is at the same directory as the log files. The other cache.db are generated when you try to run the import function but failed.
I was able to recover my data with version 0.9.1with copying/moving directories and importing. This was attempting various suggestions commented here and to see how the new directory structure worked verse a copy I made after upgrading to 0.9.0, because this was random trial and error, I am not sure how to reproduce this.
Updated from 0.8.8-1 to 0.9.1-2. Did the SQL command. Opened Appflowy same issue. Had to restore...