Re: [Tracker] Keeping tags synchronized across computers



Am Freitag, den 31.07.2009, 12:49 -0400 schrieb Gary Bishop:
I keep the my files synchronized on my computers at work and at home 
(using Unison). If I use MetaTracker tags to organize my files, I'd like 
to keep those sync'ed up also.

The databases in .cache/Tracker are huge. All I need to sync are the 
tags. Is there a way to transmit only that info?

Well, I had the same problem when tags got destroyed when upgrading to
new versions of tracker. I ended up extracting the tags from the old db
and importing it to the new db:

I opened ~/.cache/tracker/file-meta.db with firefox's sqlite manager or
an sqlite database browser:

SELECT  s.id,  kw.MetaDataID, kw.MetaDataValue FROM Services s,
ServiceKeywordMetaData kw where MetaDataID = 19 and s.ID = kw.ServiceID

and exported the results to a csv file.
Then I re-imported the csv file into a table called tags_export
and executed:
INSERT INTO ServiceKeywordMetaData (ServiceID, MetaDataID,
MetaDataValue) select s.ID, ex.MetaID, ex.TAG from Services s,
tags_export ex where s.Path=ex.Path and s.Name=ex.Name

Worked for me!


-- 
thomas





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]