# Recover from very old backup

**URL:** <https://forum.delta.chat/t/recover-from-very-old-backup/2692>\
**Category:** Mutual Help\
**Created:** [August 24, 2023, 4:59am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692 "2023-08-24T04:59:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![qun](https://forum.delta.chat/letter_avatar_proxy/v4/letter/q/f1d935/32.png) [@qun](https://forum.delta.chat/u/qun)\
**Post date:** [August 24, 2023, 4:59am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/1 "2023-08-24T04:59:18Z")

</div>

Need some suggestion about recovering my data:

My android app stopped working after the 1.40 issue. There’s something wrong with my Titanium Backup files, and the app would quit immediately, even after I downgraded to 1.38.2. May be the data files were corrupted?

I have a very old Delta Chat backup `.bak` file lying around (2019-08!), but encountered 2 issues trying to restore from it:

1. Android app doesn’t let me select the .bak file in the file picker - Not sure why file is greyed out
2. On desktop app, the log says `core/event ERROR IMEX failed to complete: numeric field was not a number: when getting cksum for SQLite format 3` immediately after opening the file for restore

I reckon the backup was created way back with the old core (compared with the current Rust core) and they’re not compatible. I could spin up a VM and run an old version of the desktop app to try to restore the backup. Or, perhaps backups made on android app isn’t compatible with desktop app?

What should I try next? I’m comfortable with tinkering the backup SQLite file but dunno where to start. Any suggestion would be much appreciated!

Here are my options:

1. Tinker with the Titanium Backup files and try to fix the corruption
2. Spin up old Ubuntu VM and restore to an old desktop app

p.s. I’ve trouble getting the Android app crash logs, suggestion appreciated!

---

<div class="post-metadata">

**Author:** ![qun](https://forum.delta.chat/letter_avatar_proxy/v4/letter/q/f1d935/32.png) [@qun](https://forum.delta.chat/u/qun)\
**Post date:** [August 24, 2023, 7:49am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/2 "2023-08-24T07:49:25Z")

</div>

I’m getting the following error after downgrade app, and restored app data from Titanium Backup.

Doesn’t look like a Delta Chat error?

Under root, I tried deleting the database under `/data/user/0/com.b44t.messenger/no_backup/`, but that didn’t solve the app quitting issue.

```plaintext
type: crash
osVersion:
package: com.b44t.messenger:621
process: com.b44t.messenger
processUptime: 26 + 72 ms

java.lang.IllegalStateException: The file system on the device is in a bad state. WorkManager cannot access the app's internal data store.
	at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:115)
	at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: Cannot open database '/data/user/0/com.b44t.messenger/no_backup/androidx.work.workdb' with flags 0x30000000: Unable to deduct failure reason
	at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:262)
	at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
	at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:512)
	at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:210)
	at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:202)
	at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1094)
	at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1074)
	at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:938)
	at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:927)
	at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:380)
	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:323)
	at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:145)
	at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:106)
	at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:352)
	at androidx.work.impl.utils.ForceStopRunnable.cleanUp(ForceStopRunnable.java:156)
	at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:87)
	... 4 more
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
	at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
	at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:224)
	... 19 more

```

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/letter_avatar_proxy/v4/letter/l/ee7513/32.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [August 24, 2023, 10:24pm UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/3 "2023-08-24T22:24:40Z")

</div>

> [@qun](#):
>
> Or, perhaps backups made on android app isn’t compatible with desktop app?

They are compatible, all backups are generated by the same Rust core regardless of whether you are using Android, Desktop or iOS.

---

<div class="post-metadata">

**Author:** ![qun](https://forum.delta.chat/letter_avatar_proxy/v4/letter/q/f1d935/32.png) [@qun](https://forum.delta.chat/u/qun)\
**Post date:** [August 24, 2023, 11:48pm UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/4 "2023-08-24T23:48:16Z")

</div>

Good to know! Any suggestion to get pass the restore error? `core/event ERROR IMEX failed to complete: numeric field was not a number: when getting cksum for SQLite format 3` immediately after opening the file for restore.

---

<div class="post-metadata">

**Author:** ![qun](https://forum.delta.chat/letter_avatar_proxy/v4/letter/q/f1d935/32.png) [@qun](https://forum.delta.chat/u/qun)\
**Post date:** [August 25, 2023, 1:32am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/5 "2023-08-25T01:32:52Z")

</div>

Current android app crash log, help appreciated!

```plaintext
type: crash
osVersion: 
package: com.b44t.messenger:6582
process: com.b44t.messenger
processUptime: 42 + 61 ms
installer: com.machiav3lli.fdroid

java.lang.NullPointerException: Attempt to read from field 'int com.b44t.messenger.rpc.Rpc$Response.id' on a null object reference in method 'void com.b44t.messenger.rpc.Rpc.processResponse()'
    at com.b44t.messenger.rpc.Rpc.processResponse(Rpc.java:30)
    at com.b44t.messenger.rpc.Rpc.lambda$start$0$com-b44t-messenger-rpc-Rpc(Rpc.java:52)
    at com.b44t.messenger.rpc.Rpc$ExternalSyntheticLambda0.run(Unknown Source:2)
    at java.lang.Thread.run(Thread.java:1012)

```

---

<div class="post-metadata">

**Author:** ![Simon](https://forum.delta.chat/user_avatar/forum.delta.chat/simon/32/287_2.png) [@Simon](https://forum.delta.chat/u/Simon)\
**Post date:** [August 25, 2023, 8:46am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/6 "2023-08-25T08:46:35Z")

</div>

It is already fixed but f-droid takes ages to update. Should be ready any day now…

---

<div class="post-metadata">

**Author:** ![qun](https://forum.delta.chat/letter_avatar_proxy/v4/letter/q/f1d935/32.png) [@qun](https://forum.delta.chat/u/qun)\
**Post date:** [August 28, 2023, 1:06am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/7 "2023-08-28T01:06:10Z")

</div>

Thanks for the assurance. I’ve got an impression that my data files are corrupted. What’s my best bet to recover from that?

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/letter_avatar_proxy/v4/letter/l/ee7513/32.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [August 28, 2023, 1:20am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/8 "2023-08-28T01:20:30Z")

</div>

Could you try opening the .bak file with [`sqlitebrowser`](https://github.com/sqlitebrowser/sqlitebrowser) or the command line? What is the size of it?

The failure to open the database after Titanium Backup restore looks like a permission problem, maybe try restoring it and then try to change ownership of the directory to match the UID of the app if you have root and some command line knowledge. Apps under android get different UIDs each time they are installed.

---

<div class="post-metadata">

**Author:** ![qun](https://forum.delta.chat/letter_avatar_proxy/v4/letter/q/f1d935/32.png) [@qun](https://forum.delta.chat/u/qun)\
**Post date:** [September 4, 2023, 3:55am UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/9 "2023-09-04T03:55:05Z")

</div>

Thanks @link2xt good suggestions. I’ll try to browse the .bak file.

Have updated to latest FD 1.40.1 build and still not starting - Some kind of file corruption or permission issue it seems. In Termux I’ve checked the UID/GID they all seem correct (matching `com.b44t.messenger` directory’s UID and GID)

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [October 6, 2026, 3:11pm UTC](https://forum.delta.chat/t/recover-from-very-old-backup/2692/10 "2026-10-06T15:11:18Z")

</div>


