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

Synchronize bookmarks and notes to Google Drive #154

Closed
tuomas2 opened this issue Nov 20, 2018 · 19 comments · Fixed by #2584
Closed

Synchronize bookmarks and notes to Google Drive #154

tuomas2 opened this issue Nov 20, 2018 · 19 comments · Fixed by #2584

Comments

@tuomas2
Copy link
Contributor

tuomas2 commented Nov 20, 2018

(Note: plans here are outdated, implementation more or less ready in #2584)

I'm planning to implement this by writing journal of events in files in sync folder (in Google drive) that can be replayed on synced devices. Periodic cleanup of the folder can be performed and full database dump will be stored.

I.e. sync folder would contain something like this:

- database-20190101010101.db #Full database
- journal-20190101020101.json #Changes since last database dump
- journal-20190201030101.json #Changes since last journal entry
-...
- database-20190201010101.db #Full database will be written at some point as a new starting point, then old journals and database dumps can be removed.
@tuomas2
Copy link
Contributor Author

tuomas2 commented Dec 28, 2018

From user:

Missing an account sync ,so you can highlight the verse but it is only for you device, after reinstall, you are loosing data (some manual saving is possible), but not good for user.

@MasterOfTheTiger
Copy link

Maybe MEGA or Nextcloud as well?

@steelwil
Copy link

steelwil commented Jan 6, 2019

Do not forget about reading plan progress.

@mattzab
Copy link

mattzab commented Jan 6, 2019

An app called Fitnotes syncs to a hidden Google Drive folder in the background approximately one hour after the user has input data. This allows access on multiple devices.

I would specifically recommend against using MEGA simply because of its recent association with the Chinese Government.

@tuomas2
Copy link
Contributor Author

tuomas2 commented Jan 6, 2019

Not sure but maybe this can be service transparent (like installing document from zip).

@tuomas2 tuomas2 self-assigned this Aug 15, 2019
@tuomas2 tuomas2 added this to the v3.3 milestone Oct 3, 2019
@tuomas2 tuomas2 removed their assignment Jan 6, 2020
@tuomas2 tuomas2 modified the milestones: v3.3, v3.4 Jan 6, 2020
@timbze
Copy link
Contributor

timbze commented Sep 16, 2020

Maybe this idea is overkill, but perhaps this feature could be mostly implemented in a separate Kotlin native library, that way it would be easier to also sync with other sword apps on desktop and IOS.

There would need to be the option to work with different types of data separately, e.g. one app might want to only sync bookmarks.

@tuomas2 tuomas2 modified the milestones: v3.4, v3.5 Mar 4, 2021
@tuomas2
Copy link
Contributor Author

tuomas2 commented Mar 22, 2021

Developer:

Perhaps easier starting point would be to add uuid's and timestamps to all db rows in all tables and make it first possible to "merge" backup database (instead of replacing one). Then, if same uuid is in both db's, then use more recent one.

@agrogers
Copy link
Contributor

Hi Tuomas

I think this is becoming even more important now that we can use BSA (Bible Study App) for so much.

I think it is worth considering a really simple solution. Just backup the DB to google drive automatically (perhaps when the app loses focus) and check that file when starting BSA gets focus. If the DBs are out of date prompt the user to restore it with some info on when it was last backed up and from what device.

This is how I do it now when switching between devices but it is tedious and I can forget sometimes.

Or if it can't be done manually, add an option to the backup form to allow 'Synching' which basically uploads or downloads based some version or datetime stamp.

@tuomas2
Copy link
Contributor Author

tuomas2 commented Sep 23, 2021

simple solution better than no solution at all. this might work in many cases well enough.

@agrogers
Copy link
Contributor

My feeling is:

  1. Implement a manual and easy option ASAP.
  2. Try to automate it a little.
  3. Implement a last change always wins fancier option on a record by record basis.

@tuomas2
Copy link
Contributor Author

tuomas2 commented Aug 6, 2022

apparently it is possible to have limited access to google drive like this
Selection_018
:

@mattzab
Copy link

mattzab commented Aug 6, 2022

That's how FitNotes works, as I mentioned above .

There's also an open source project that I use, called rclone, that is designed for cloud storage sync to many (almost 50) different cloud providers. It can easily be configured to access this hidden part of Google drive. It may help get this feature going in the right direction.
rclone.org

They have arm binaries, here's a link to an unofficial Android rclone project, https://github.com/x0b/rcx

@agrogers
Copy link
Contributor

agrogers commented Aug 7, 2022 via email

@tuomas2 tuomas2 moved this to Better ideas in Wishing Well Sep 10, 2022
@github-project-automation github-project-automation bot moved this to Needs triage in Tuomas' project board Apr 6, 2023
@tuomas2 tuomas2 moved this from Needs triage to Features I really want to do in Tuomas' project board Apr 6, 2023
@tuomas2
Copy link
Contributor Author

tuomas2 commented Apr 20, 2023

Unfortunately all cloud services have their own APIs and no generic approach to support (all) cloud storage services seem to exist. So, I'm planning to implement only Google Drive support.

@tuomas2
Copy link
Contributor Author

tuomas2 commented May 1, 2023

Hi Tuomas

I think this is becoming even more important now that we can use BSA (Bible Study App) for so much.

I think it is worth considering a really simple solution. Just backup the DB to google drive automatically (perhaps when the app loses focus) and check that file when starting BSA gets focus. If the DBs are out of date prompt the user to restore it with some info on when it was last backed up and from what device.

I have been playing around with this a little in #2584. I made some optimization to the db filesize and gzipped it and my db currently is about 500 kB, gzipped. And I know that some people have much larger databases. This approach that we upload / download whole db when focusing/unfocusing feels quite wasteful for bandwidth. Need to think about different options...

@tuomas2

This comment was marked as outdated.

@tuomas2
Copy link
Contributor Author

tuomas2 commented Jun 6, 2023

Do you think there might be some interest for self-hosted solution? It would be possible to implement support for minio (s3 compatible) as an "free alternative". https://github.com/minio/minio
I'm just thinking about all the de-googlers out there...

@timbze
Copy link
Contributor

timbze commented Jun 6, 2023

Do you think there might be some interest for self-hosted solution?

How about just a directory? I use Syncthing, or even Nextcloud etc could be used like that. Haven't looked at minio yet

@tuomas2
Copy link
Contributor Author

tuomas2 commented Jun 6, 2023

Do you think there might be some interest for self-hosted solution?

How about just a directory? I use Syncthing, or even Nextcloud etc could be used like that. Haven't looked at minio yet

Does not sound a reliable method. Implementation requires that files are uploaded in order, immediately. If AB would write one patch first, then after one minute, another patch, and then Syncthing would do its job in wrong order, that would make things messy.

@github-project-automation github-project-automation bot moved this from Features I really want to do to Closed in Tuomas' project board Jun 8, 2023
@github-project-automation github-project-automation bot moved this from Better ideas to Done in Wishing Well Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants