![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
![]()
I've learned from the following post https://www.mobileread.com/forums/sh...php?t=292382#3 how to apply a fake registration to a jailbroken PW3 (and KT3, too) that is only used offline (in airplane mode).
BTW: A really cool feature! ![]() ![]() The fake registration opens the door to create and manage local collections. Interesting feature for me, as I've roundabout 1000 books/documents stored on my device... ![]() ![]() But here starts my problem: Where is the informaton about the local collections setup stored? I didn't find any traces in the user visible storage, not even in /mnt/us/system/ ... ![]() I ask this question as I want to backup my current collection setup besides the documents themselves, thus being able to restore all of them to a replacement Kindle without needing an Amazon account and/or the cloud. Any suggestions are welcome! ![]() ![]() |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,179
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
![]() So, the only thing I have to do, is copying the file /var/local/cc.db to a safe place. If needed, I may restore it to another Kindle with the same fw version and content of the documents folder at the point of time I've saved the mentioned database file? (IOW: make a full backup of /mnt/us/ and additionally save /var/local/cc.db?) No other files from e.g. /var/local/* needed? |
![]() |
![]() |
![]() |
#4 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
You might need some of the other database files, but cc.db is the main one.
If librariansync is working for you, then whatever it does to the database system is what you want to keep. It need not be firmware specific - just back up a complete dump of the database. Code:
cd /var/local sqlite3 cc.db .dump >/mnt/us/collections.sql collections.sql is a script file to create a new database with: Code:
cd /var/local sqlite3 my.db </mnt/us/collections.sql then read them and tell us which ones are related to the other ones. Those would make a good couple of examples for the runme thread. See also: http://www.sqlitetutorial.net/sqlite-dump/ or a runme script to schedule a regular running of a script to backup the database files with cron/at maybe once a week? Last edited by knc1; 12-15-2017 at 07:34 AM. |
![]() |
![]() |
![]() |
#5 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
... ugh ...
Sorry, though I've got al lot of computer experience, this sounds a bit too difficult for me to get, install and then burrow into the needed tools. Why isn't it possible to just transfer some (or even better: only one) file(s) to another device that contains all information about collections? ![]() And what the hell let Amazon/Lab126 decide that on the one hand the very low level search indices reside inside the /system/ subdirectory in the user visible store (next to the /documents/ folder); while on the other hand the collections db (also directly related to the local documents!) does not?!? ![]() Really confused. ![]() Okay, fonund my very individual way to avoid any risks to destroy needed db structures: Have made sceenshots of the contents in each collection - these make it much easier to gather up all the needed books from my very, very long library list a bit more quickly than the first creation of the collections (this took me a few hours of really focused work, that's why I wanted to have a backup handy, like I have one of my documents folder of course...) |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
You do not have to install anything, sqlite3 is pre-installed.
Just get command line access and type the two commands as shown. The collection('s) data base is in the user's persistent storage (/var/local) because it needs to stay in sync with the (similar) data base in the user's account on the Amazon server(s). There is no telling what might go wrong if the user could diddle the contents from visible user storage. The only technical thing to do to turn those two examples into runme.sh scripts is make the first line read: Code:
#!/bin/sh Last edited by knc1; 12-15-2017 at 10:08 AM. |
![]() |
![]() |
![]() |
#7 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
Seems that I've just forgotten that the Kindle is basically a tiny Linux computer; and jailbreaking gives - at least basic - access to it, like rooting does with an Android device.
![]() My problem also has to do with the fact, that via USB only the userspace /mnt/us/* is visible and thus can be inspected, copied and managed directly. And therefore I didn't know which basic Linux tools are actually preinstalled. Well, I have console access (via Vlasoftsoft's cool launcher - I also used the filemanager from this collection to inspect the /var/* stuff), I'll give it a try. Thanks again. |
![]() |
![]() |
![]() |
#8 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
I just tried it on a PW3 running 5.9.2 and it worked just as expected.
|
![]() |
![]() |
![]() |
#9 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
You mean that the above scripts allow to backup and restore the local collection database in the case it was corrupted or reset/deleted?
|
![]() |
![]() |
![]() |
#10 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
So you can port it between firmware versions, and even run it on your IBM mainframe (if you have DB2 installed on it). I have not had the time to discover if that is the only database file you have to save to preserve your collections. 5.9.2 made a lot of changes and they might have involved more than this one file. But the principle remains the same, only the *.db name changes for the others. ![]() I thought that is what you wanted. ![]() |
|
![]() |
![]() |
![]() |
#11 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
As stated in my OP, there's no need for porting the cc.db between different fw versions, but between different devices of the same type (or possibly between a PW3 and KT3), running all the very same fw, and containing an identical library.
And as you can read from my profile, I'm using 5.8.11 and will never ever update to the nasty 5.9.2... ![]() |
![]() |
![]() |
![]() |
#12 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
I know you are using 5.8.11, that is why I said for you to check for yourself. Sorry, but the inventors of SQL standardized on a portable text file based backup and restore. Not my fault that the format is more portable than your use case requires. Maybe you could find some proprietary tool that does backup and restore to an obfuscated binary file format (search: MS?, Lab126?) that you can not use a text editor on. |
|
![]() |
![]() |
![]() |
#13 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
Thank you for your efforts and help. The crucial piece of information in my case really was the filename /var/local/cc.db only.
What worked perfectly for me, step by step, working locally with the device only, using the file manager from Vlasoftssoft's toolbox (freeware part of his otherwise shareware PBChess package): 1) On the "master device" (with reference collection configuration), copy /var/local/cc.db to /mnt/us/ 2) Transfer this file to the other Kindle with exactly the same fw version and the same library content using USB connection via an external PC. Let's say to /mnt/us/ (root of user storage). 3) On the second Kindle, rename /var/local/cc.db to /var/local/cc.db.old (just to have a backup, this step is not really necessary...). 4) On the same Kindle, copy /mnt/us/cc.db to /var/local/cc.db 5) Immediately restart this Kindle. The duplicated collections now all are there. ![]() |
![]() |
![]() |
![]() |
#14 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
|
To make it a bit more detailed: This even worked cross-platform (tested with PW3 and KT3, both running fw 5.8.11). Unfortunately, the content of the documents folder isn't exactly the same on both devices.
All my private documents are the same on both Kindles, but the only "truly Amazon" book differs in name and contents: the Users Guide. ![]() Gesendet von meinem Google Pixel mit Yabba-Dabba-Talk. ![]() |
![]() |
![]() |
![]() |
#15 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
update the asin for it in cc.db
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Do purchased DRM'ed ebooks have any personal user info stored in them? | NonDuality | General Discussions | 70 | 09-25-2020 08:07 AM |
Folder setup on device | Aussiepaul | Library Management | 5 | 01-09-2014 09:42 AM |
Which device to choose in setup | Russ_Kauk | Devices | 1 | 02-03-2012 10:26 PM |
No Collection Support for SD card stored content | Otter | Nook Color & Nook Tablet | 17 | 12-30-2010 03:11 PM |
where is registered device info stored | grr | Kindle Formats | 10 | 10-05-2008 11:01 PM |