Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    How to import/export conversations in rtcom-eventlogger/SQLite on N900?

    Reply
    Andre Klapper | # 1 | 2010-10-22, 16:11 | Report

    I know that on the N900 conversations are stored in ~/.rtcom-eventlogger/el.db but I'm wondering how to export and import via the SQLite shell.
    (Asking because a friend of mine accidentially deleted her Conversations thread with me and would like to have it back.)

    Anybody having an idea?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    daperl | # 2 | 2010-10-22, 18:58 | Report

    After the initial Events table dump, there are a few problems that can be solved by an awk script. First off, you'll have to generate unique integers that won't conflict with her primary key 'id' field. Secondly, all the 'local' and 'remote' values need to be swapped.

    On your n900:

    sqlite3 ~/.rtcom-eventlogger/el-v1.db
    .mode insert
    .output ~/.rtcom-eventlogger/friend.txt
    select * from Events where remote_uid == '<friend remote_uid>';
    <ctrl-d>
    sed -i 's/ table / "Events" /' ~/.rtcom-eventlogger/friend.txt

    Apply awk script to friend.txt

    On her n900:

    sqlite3 ~/.rtcom-eventlogger/el-v1.db
    .read friend.txt
    <ctrl-d>
    killall rtcom-messaging-ui


    EDIT: see above in red

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by daperl; 2010-10-22 at 19:24.
    The Following 5 Users Say Thank You to daperl For This Useful Post:
    Andre Klapper, Helmuth, misterc, noobmonkey, thp

     
    daperl | # 3 | 2010-10-22, 19:25 | Report

    Oops, for some reason the insert mode didn't properly dump the table name. See above for the edit.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to daperl For This Useful Post:
    Andre Klapper

     
vBulletin® Version 3.8.8
Normal Logout