maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Contacts database in SFOS (https://talk.maemo.org/showthread.php?t=100535)

Zeta 2018-11-06 00:07

Contacts database in SFOS
 
Hi,

I did a factory reset yesterday as my Jolla 1 went a bit rogue since a few days, after a backup, and then did all the updates to SFOS 3.0.

Getting back the data from the backup (which was on the previous 2.something version, the last one before 3.0), it seems I messed something up with the contacts backup so that I don't have the last up to date contacts restored (the .vault thing).

Anyway, I did a mostly complete backup of the home directory through SSH before the factory reset, so that I have the databases that I think are the files used for the contacts (I can find the last added contacts through sqlite3 searchs in it), but can't find a way to make the system accept them.

The questions are:
* what are the differences between the /home/nemo/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db and /home/nemo/.local/share/system/privileged/Contacts/qtcontacts-sqlite/contacts.db databases (except them being owned by a different user) ?
* how can I replace them and get the system to acknowledge the manual replacement ? I noticed that there are programs using them (with lsof) like voicecall. There is also a daemon called contactsd that could be related ?

Simply replacing one or both files didn't help me much, even with reboots in between to be sure it is not kept in memory.

Getting the data from the sqlite database to a vcf file should be possible but it is spread across a lot of tables and would take some work to not lose too much details.

Thanks for any help or pointers you can give me.

Zeta 2018-11-06 00:28

Re: Contacts database in SFOS
 
Dammit...

While trying some other things, I found a way to make it accepts the changes. The file/directory ownership was not correct in the previous tries ("nemo:nemo"), and should have been "nemo: privileged" for both databases...

So all I had to do was to replace the two databases (not sure if the first one was needed), and set it the correct ownership.

I still don't understand what that "privileged/Contacts/" directory stores and how that would/should differ from the "Contacts/" directory.

Does anyone knows the logic behind this in SFOS ?

juiceme 2018-11-06 08:09

Re: Contacts database in SFOS
 
Sorry I cannot help you with that; all that I know is both databases seem to contain pretty much the same contacts, only the DB under "priviliged" hierarchy contains a lot of extra crap and seems all the entries are doubled in tables.

Zeta 2018-11-08 00:08

Re: Contacts database in SFOS
 
Spoke too soon, it looks like it doesn't stay across reboots...

And while they are shown in the "people" app, I can't export all of them as a vcard to do a normal import later on and be back on good tracks..., as the following command create an empty file:
Quote:

[nemo@Sailfish ~]$ devel-su -p vcardconverter --export contacts.vcf
Password:
Enjoy your privileges.
[W] unknown:0 - The 'mergePresenceChanges' option has not been configured - presence changes will only be reported via ContactManagerEngine::contactsPresenceChanged()
[D] unknown:0 - Exporting 0 contacts
[D] unknown:0 - Wrote 0 contacts
Doing a regular backup with the menu in the settings page gives a tar file in which the "People/data/all.vcf" is empty (size 0).

I will try the laborious task to select the all one by one in the people app to export them (there is no "select all" option), but we are talking of close to 200 contacts, so this will take some time.

Not sure what else to try to export the contacts from the database to vCard files to later try a regular import. Any ideas ?


All times are GMT. The time now is 13:42.

vBulletin® Version 3.8.8