Quantcast
Channel: MobileRead Forums - Kobo Developer's Corner
Viewing all articles
Browse latest Browse all 1570

DB Auto-Backup Tool for Kobo

$
0
0
Since I got the database corrupted very much times, I decided to do this little auto-backup tool.

It simply backups the db every 20 minutes in a hidden place. If the database is corrupted, you can see the backup in the .kobo folder with the name KoboReader_bak.sqlite.

How to install it: Check the instructions here.
How to repair your db: if you want to restore the backup, you have to follow these steps very carefully:
  1. attach your device to a PC
  2. go to .kobo directory
  3. rename KoboReader.sqlite as you want
  4. rename KoboReader_bak.sqlite to KoboReader.sqlite

I hope it will help us to save some time. Thanks to tshering for sqlite and USB detection, and yoq for runonce trick.


For devs only:
Spoiler:
Currently the script has some limitations:
  1. I need a better way to detected when the device is connected via USB (lsusb)
  2. no message is displayed if db is corrupted. I'm trying to use the LED light. I also know that I can display images using pickel showpic or pickel wait-for-hit (no pickel legendary?) but it does not work: I tried this while SSH connected, without any success:
    PHP Code:

    killall -STOP nickel
    zcat 
    /etc/images/kraken-factory-reset.raw.gz | /usr/local/Kobo/pickel showpic 


old post contents:
Spoiler:
backup file is not in the flash partition, but in /var/bak/. This is the reason.
-------------------------------------------------------------------------------
PHP Code:

zcat /etc/images/error_kernel.raw.gz | /usr/local/Kobo/pickel wait-for-hit 0 0 100 100 0 100 100 100 


.

Attached Files
File Type: zip [Kobo] DB Auto-Backup Tool - v0.2.zip (259.1 KB)

Viewing all articles
Browse latest Browse all 1570


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>