![]() |
#1 |
Connoisseur
![]() Posts: 55
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
|
Any progress with rclone?
The Kobo rclone wrapper appears defunct with no commits or email threads since 2018. Has anyone made any progress since then? rclone would have a big benefit over kobocloud in that it has bidirectional syncing, so the user could remove a book from the kobo and have that removed from the cloud, and also annotations would be updated in cloud storage. I have rclone running on the kobo but don't see a simple way to cause the synced folders to appear in my library. Anyone working on this?
|
![]() |
![]() |
![]() |
#2 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71,886
Karma: 122094787
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#3 | |
Connoisseur
![]() Posts: 55
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
|
Quote:
|
|
![]() |
![]() |
![]() |
#4 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71,886
Karma: 122094787
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() Posts: 55
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
|
Quote:
The other way to do this would be to somehow cause Kobocloud (or rclone) not to download something again if it had already been downloaded but then removed from the device. I don't think any of the existing solutions allow for either of these approaches. |
|
![]() |
![]() |
![]() |
#6 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,209
Karma: 25767288
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Just write a minimal shell script that uses rclone/rsync for the bidir sync, and NickelDBus/NickelMenu for the library refresh?
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() Posts: 55
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
|
You're right, that works. I just wasn't putting the synced books in the right place. The bidir sync seems reliable enough for my purposes, and I created a separate Google Drive account just for this purpose so any snafu won't infect any other files.
|
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71,886
Karma: 122094787
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Use something else such as Dropbox of OneDrive. |
|
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,026
Karma: 71732462
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Quote:
Sent from my Pixel 4a using Tapatalk |
|
![]() |
![]() |
![]() |
#10 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71,886
Karma: 122094787
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Google Drive is not good as a one way clone of your library. If you need to download it, it will be corrupt. The same reason you cannot put a live library is the same reason you cannot put a copy.
|
![]() |
![]() |
![]() |
#11 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 143000
Join Date: Apr 2022
Device: Kobo Libra 2
|
After KoboCloud had disappointed me a few times, mostly resulting in me loosing my library (probably due to the bind mount trick), I've decided to give rclone a go. Here's a few pointers if anybody wants to follow along:
Code:
[local] encoding = Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot [yourRemoteLibrary] [...] Next, create a script named sync.sh in the same folder: Code:
#!/bin/sh RCLONE="/mnt/onboard/.adds/rclone" REMOTE="yourRemoteLibrary:" LIBRARY="/mnt/onboard/library" echo "waiting for internet connection" r=1;i=0 while [ $r != 0 ]; do if [ $i -gt 60 ]; then echo "error! no network available"... exit 1 fi ping -c 1 -w 3 aws.amazon.com >/dev/null 2>&1 r=$? if [ $r != 0 ]; then sleep 1; fi i=$(($i + 1)) done $RCLONE/rclone \ --workdir $RCLONE/.cache \ --ca-cert $RCLONE/cacert.pem \ --log-file "$RCLONE/rclone.log" \ --modify-window 3s --ignore-checksum --no-update-modtime \ --verbose \ bisync $REMOTE $LIBRARY && qndb -m pfmRescanBooks
Attention! Before running the script the first time, you need to append a `--resync` flag in order to get bisync working. See the rclone docs: https://rclone.org/bisync/ In case you want to run this script automatically, you can just add a udev rule (e.g. /etc/udev/rules.d/97-rcloud.rules) like this: Code:
KERNEL=="eth*", ACTION=="add", RUN+="/mnt/onboard/.adds/rclone/sync.sh" KERNEL=="wlan*", ACTION=="add", RUN+="/mnt/onboard/.adds/rclone/sync.sh" Ps. You can also just use "rclone sync", if you don't need bidirectional syncing. |
![]() |
![]() |
![]() |
#12 | |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,209
Karma: 25767288
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Quote:
So, yeah, UTC vs. local vs. DST; plus weird Linux quirks regarding timezones at boot make this a power keg for stupid timestamp discrepancies ![]() |
|
![]() |
![]() |
![]() |
#13 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 143000
Join Date: Apr 2022
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#14 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2023
Device: Kobo Libra H2O, Kobo Clara 2E
|
Thanks for the guide @qkqw! A couple of small things I'd add
1. On my Clara 2E the network device is mlan0 so I needed this rule Code:
KERNEL=="mlan*", ACTION=="add", RUN+="..." Code:
KERNEL=="eth*", ACTION=="add", RUN+="/bin/sh -c '/bin/pull &'" 4. I like to output the log to the screen so I can check it worked. So Code:
rclone copy --args-etc 2>&1 | /usr/local/kfmon/bin/fbink 5. For some reason rclone used a different config file location when running from SSH and koreader vs when running from udev. Can be fixed by specifying with the --config flag. |
![]() |
![]() |
![]() |
#15 | |||
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 143000
Join Date: Apr 2022
Device: Kobo Libra 2
|
Quote:
Quote:
Quote:
Should be enough to put the config in the same directory as rclone? |
|||
![]() |
![]() |
![]() |
Tags |
rclone |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tools rclone mount on jailbroken kindle? | xiatian | Kindle Developer's Corner | 0 | 08-24-2021 05:36 AM |
Progress bar: this unknown. (chapter progress) | gabryele | Kobo Reader | 23 | 12-14-2019 06:02 PM |
[WIP] kobo-rclone - Kobo wrapper for Rclone | sherman | Kobo Developer's Corner | 32 | 08-08-2018 12:00 AM |
Progress | felinus | Conversion | 2 | 06-13-2012 09:06 AM |
Novel in Progress | plumboz | Writers' Corner | 10 | 12-11-2009 12:03 AM |