We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

Import selected SMS from a backup [answered]

asked 2015-07-05 00:15:29 +0200

nomeata gravatar image

I accidentially deleted all SMS of one contact. So I went to a backup of two days earlier, opened /home/nemo/.local/share/commhistory/commhistory.db in sqlite3 and extracted the relevant rows:

.mode insert Events
.output foo.sql
select * from Events where type = 2 and remoteUid LIKE '%12345';

I copied the resulting foo.sql to my Jolla and imported it with

sqlite3 /home/nemo/.local/share/commhistory/commhistory.db < foo.sql

and the new rows are definitely there and were not there before.

However, they are not shown in the messaging app. Do I need to copy more, or update some kind of index?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by raketti
close date 2015-07-05 01:01:41.760847

Comments

1

Is it possible to restore them from the commhistory-tool_groups.dump?

I did a backup and a reset of the phone. After the update marathon i wanted to restore the backup, but Sailfish couldn't find it. . The backup is called sailfish_backup_2017-01-05T11-35-18Z.tar and Contains

Accounts
Browser
Calendar
Gallery
Media
Message
Notes
People
Phone

I find in it the commhistory-tool_groups.dump Can I some how restore the SMS communication?

Linus Kasch ( 2017-01-05 23:09:18 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-07-05 00:19:50 +0200

nomeata gravatar image

I found the problem. The Events table references the Group table using the groupId column. Because I deleted all SMS of that contact it got assigned a new group later.

I was able to fix it by issuing

update Events set groupId = 116  where type = 2 and remoteUid LIKE '%12345';

on my Jolla. Now all SMS are back.

edit flag offensive delete publish link more

Question tools

Follow
4 followers

Stats

Asked: 2015-07-05 00:15:29 +0200

Seen: 535 times

Last updated: Jul 05 '15