Omni-Notes icon indicating copy to clipboard operation
Omni-Notes copied to clipboard

Backup/export in SQLite vs JSON

Open econo202 opened this issue 7 years ago • 6 comments

I've recent noticed that there are 2 different data formats used to backup notes depending on which Omni Notes version is used:

Are there any plans to implement JSON backups in ON "standard" and to add automatic backup option, which is currently present in ON Alpha?

econo202 avatar Mar 15 '18 17:03 econo202

You perfectly got the point!

This feature will be also used (I actually use it on my own build but it still needs to be tested deeply) to sync notes between devices and desktop, where I use the Omni Notes Desktop crossplatform application.

federicoiosue avatar Mar 22 '18 21:03 federicoiosue

is the plan to replace sqlite by json for backup? what about support both formats? would the app keep using sqlite internally?

I like the current support for backup in a sqlite file. In fact, I managed to move my previous notes from another app to Omni-notes using an SQL script..

dapgo avatar Jun 21 '18 14:06 dapgo

@dapgo replacing is the objective. Actually performing a backup just by copying the database is not that much secure and needs a lot of processing to keep database format aligned with latest app version.

Moving to JSON would help both to be fully compatible with the desktop application and to manage in a more object-oriented way the backup/restore operations.

federicoiosue avatar Jun 26 '18 07:06 federicoiosue

This version already works like that (really outdated but it helps to better understand, and works aside of the normal app): https://play.google.com/store/apps/details?id=it.feio.android.omninotes.alpha

federicoiosue avatar Jun 26 '18 07:06 federicoiosue

I understand that when JSON support is ready, Omni-notes automatically will convert the information in sqlite to JSON, so no worries for end-users. Am I right?

dapgo avatar Jun 26 '18 08:06 dapgo

Exactly, everything will be transparent to the users. The only drawback is that older backup will be no more compatible, inevitably

federicoiosue avatar Jun 26 '18 09:06 federicoiosue