Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backed up database is empty #678

Closed
eduardosm opened this issue May 23, 2019 · 9 comments
Closed

Backed up database is empty #678

eduardosm opened this issue May 23, 2019 · 9 comments

Comments

@eduardosm
Copy link

Describe the bug
The sqlite database from backups is empty.

Context

  • Device: Huawei Mate 10
  • OS version: Android 9
  • App version: 5.5.2

How to reproduce
Steps to reproduce the behavior:

  1. Fresh Omni-Notes install
  2. Create one or more notes
  3. Make a backup
  4. Copy the backup to a PC
  5. Open the sqlite database (e.g., with sqlitebrowser)
  6. The database is empty

Expected behavior
There should be a table with the notes.

@federicoiosue
Copy link
Owner

It's a known problem with Android Pie. It's addresses in Beta builds by exporting notes as JSON

@ArmitageShanks
Copy link

I just lost all my data by doing a backup and restoring it on Pie.

Can I only restore this backup on pre Pie ROM now?

@federicoiosue
Copy link
Owner

I just lost all my data by doing a backup and restoring it on Pie.

Can I only restore this backup on pre Pie ROM now?

As stated above you must be on Beta channel to be able to use backups on Pie

@ArmitageShanks
Copy link

Oh I got that. But I wondered if it's possible to restore the backup I already done on Pie or do I have to get an older ROM, I need the data in the old backup.

From what I understood about the json issue, old backups won't work on Pie?

And how do I get on the beta channel?

And thanks for a great app!

@federicoiosue
Copy link
Owner

Oh I got that. But I wondered if it's possible to restore the backup I already done on Pie or do I have to get an older ROM, I need the data in the old backup.

From what I understood about the json issue, old backups won't work on Pie?

And how do I get on the beta channel?

And thanks for a great app!

Android Pie made some big changes on app's database management. The previously used data backup was quite elementary: it just used to copy database and restore it from/to different folders. When the app was restarted (directly by the restore process) everything worked like a charm.

Now, due to this new database management (based on WAL) doesn't allow that anymore.

If you're available for a test I could try a workaround without requiring to move to beta version.

@ArmitageShanks
Copy link

If you're available for a test I could try a workaround without requiring to move to beta version.

Sure thing. Let me know what to do.

@federicoiosue
Copy link
Owner

federicoiosue commented Jul 23, 2019

If you're available for a test I could try a workaround without requiring to move to beta version.

Sure thing. Let me know what to do.

Could you please try this version? Is just an update to the latest version released on Play Store so it's safe to update because app's signature is checked.

I made a couple of attempts and it seems to work to backup/restore data on Android Pie. The problem is: I'm not that much sure if your backup is good (I'm afraid not). But you should at least be able to use some previously made backups before Android Pie, if you have any.

@ArmitageShanks
Copy link

It works!

@federicoiosue
Copy link
Owner

Great, you rock!
I'll publish on Play Store then!
Thanks for your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants