Difference between revisions of "Dumping Messages From PalmDatabase"

From WebOS Internals
Jump to navigation Jump to search
(Replacing page with '{{template:patch}} idk what I was doing wrong but with every modification to PalmDatabase.db3 the database got corrupted and it had to recreate new one...')
 
Line 1: Line 1:
 
{{template:patch}}
 
{{template:patch}}
  
ok so i took a look at the PalmDatabase.db3 and it looks like we need to dump 3 tables
+
idk what I was doing wrong but with every modification to PalmDatabase.db3 the database got corrupted and it had to recreate new one...
 
 
ok this is a very raw version of stuff
 
 
 
So we want to dump all our messages from PalmDatabase.db3
 
 
 
here is one simple way to do it
 
 
 
WELL IT LOOKS LIKE com_palm_pim_Message is not the right thing. This a view in sqlite database... I have search for a table that keeps all the info..
 
 
 
back to search
 
 
 
to dump the messages to file:
 
<pre><nowiki>echo ".mode insert" > cookies; sqlite3 -init cookies /var/luna/data/dbdata/PalmDatabase.db3 'select * from com_palm_pim_Message' >/tmp/messages.sql;rm cookie</nowiki></pre>
 
 
 
to insert it to our database:
 
<pre><nowiki> cat /tmp/messages.sql| sqlite3 /var/luna/data/dbdata/PalmDatabase.db3</nowiki></pre>
 
the question now is how to import it to freshly created database....
 
 
 
 
 
anyway what I was trying to do is to:
 
 
 
 
 
remove my database on pre...
 
does palm has a script to create the new database?! (PalmDatabase.db3)???????
 
if yes then run the script... and try to import my messages to check if everything is working fine....
 
 
 
 
 
if everything is working fine we should be able to write a simple script to do that automatically for us... and it also could send the whole messages.sql to our email so we will have it for future reference
 
and also we will be able to use the file to insert the messages to our new PalmDatabse.db3 file after webos doctor.
 
 
 
I hate losing my messages
 
 
 
-- according to sqlite com_palm_pim_Message is a view need to research about it... i'm not so good in sqlite
 
 
 
--[[User:En0x|en0x]] 19:32, 2 October 2009 (UTC)
 

Latest revision as of 20:54, 5 November 2009


idk what I was doing wrong but with every modification to PalmDatabase.db3 the database got corrupted and it had to recreate new one...