Where to find the settings file for Calendar

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Post Reply
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Where to find the settings file for Calendar

Post by T-buch »

My two computers are already syncing folders

So I thought - If I only could find where the Thunderbird/Ligtning/Calendar stores the settings... find the file where it stores the setting I could sync the Calendar between my two computers

So I need to know where I can find the file?
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Re: Where to find the settings file for Calendar

Post by T-buch »

I think I had found out

C:\Documents and Settings\???\Application Data\Thunderbird\Profiles\[Profil Name}\calendar-data
User avatar
ssitter
Posts: 2495
Joined: October 19th, 2007, 12:24 am
Location: Germany

Re: Where to find the settings file for Calendar

Post by ssitter »

All settings are stored in file prefs.js, including Thunderbird and Lightning settings. Data is stored in storage.sdb and the mentioned calendar-data folder.
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Re: Where to find the settings file for Calendar

Post by T-buch »

Thanks a lot
But should i then read your post that there is no possibility to sync only the calender settings?
User avatar
ssitter
Posts: 2495
Joined: October 19th, 2007, 12:24 am
Location: Germany

Re: Where to find the settings file for Calendar

Post by ssitter »

There are many ways to sync calendar data and settings. Personally I just use plain old iCalendar (ics) files that are stored in a shared location and that are integrated as a calendar on my different systems. Profile files or settings are not synced in my setup.
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Re: Where to find the settings file for Calendar

Post by T-buch »

But then you have to do it manually ?
jbraner
Posts: 34
Joined: January 3rd, 2008, 3:14 pm
Location: Edinburgh

Re: Where to find the settings file for Calendar

Post by jbraner »

ssitter,

How do you export ics files from Thunderbird?
Before Lightning 1.0b2, we could just copt the local.sqlite file from the calendar-data folder. That doesn't seem to work anymore. As I said in another thread - every time thewre is a new beta of Lightning, they seem to change how the calendar data is stored. That would be fine if it was easy to find the changes and adjust accordingly.

I like to sync my calendar between my PC and my laptop - and it's a continuous challenge every time Lightning updates. :-\
===========
John Braner
jbraner
Posts: 34
Joined: January 3rd, 2008, 3:14 pm
Location: Edinburgh

Re: Where to find the settings file for Calendar

Post by jbraner »

Aha - I found it myself! From a calendar tab -> Events and Tasks -> Export
and then Import on the other machine

I don't know if this is new or not - but it's very easy.
OK Lightning developers - all is forgiven ;-)
===========
John Braner
MozillaMonkey
Posts: 513
Joined: April 21st, 2008, 7:52 pm

Re: Where to find the settings file for Calendar

Post by MozillaMonkey »

>All settings are stored in file prefs.js, including Thunderbird and Lightning settings. Data is stored in storage.sdb and the mentioned calendar-data folder.

I thought data was stored in
C:\Documents and Settings\aaaaa\Application Data\Mozilla\Sunbird\Profiles\g8rvfa15.default ?
jbraner
Posts: 34
Joined: January 3rd, 2008, 3:14 pm
Location: Edinburgh

Re: Where to find the settings file for Calendar

Post by jbraner »

ssitter is talking about the *calendar* data ;-)
===========
John Braner
User avatar
ogirtd
Posts: 365
Joined: December 29th, 2005, 6:28 am

Re: Where to find the settings file for Calendar

Post by ogirtd »

Sorry for bumping an old topic. I just found this topic after trying use local.sqlite to import all events from an old calendar I had.
Anyway - the solution I found, which I hope can help other, is to open prefs.js inside the profile folder, and to find the ID of your NEW calendar (32 chars). Copy this ID, and open local.sqlite in any sqlite database browser. Then, run these queries:

Code: Select all

update cal_attendees set cal_id='NEWID';
update cal_events set cal_id='NEWID';
update cal_properties set cal_id='NEWID';
update cal_recurrence set cal_id='NEWID';

where NEWID is the ID (32 chars) of your new calendar. Save the database, and that's it! :)
Of course, this is on your responsibility only. Don't come blaming me if anything goes wrong :) Just backup your profile folder before doing anything.
Reviving abandoned Firefox & Thunderbird themes since 2006.
clarkede
New Member
Posts: 1
Joined: November 11th, 2011, 8:32 am

Re: Where to find the settings file for Calendar

Post by clarkede »

Ogirtd,

Your advice worked great. Without it, I would have been helpless and might have given up hope restoring my Calendar entries. The only thing I would add is to use the same SQL commands to adjust the "cal_alarms" and "cal_todos". Also, for those of you now sure how to issue the SQL Commands, there is a Thunderbird Add-in called "SQLite Manager" that lets you open up and look at the "local.sqlite" database file in an easy to use interface. It also lets you see the data that many of you might be wondering if it is still there or not. The SQL commands here do not really put the events back into groups that you may have previously had, but with a little work those that have a lot of events can customize the SQL commands to do it. One thing that I also noticed is that after running the commands you have to restart Thunderbird to see you r changes.

Once again, thanks for leading me right to my solution.

Don
Мастер
Posts: 1
Joined: March 21st, 2012, 5:06 am

Re: Where to find the settings file for Calendar

Post by Мастер »

Ogirtd and clakede - perfect! A hard disk failure forced me to move from my Linux machine to my Windows machine, copying the profile from the last backup. Mail was no problem, but I was just about in despair over losing my calendar and task list, when I found this solution. Worked perfectly, and I don't know jack about how SQlite works.

Many thanks!
blausand
Posts: 4
Joined: July 27th, 2010, 12:26 pm
Contact:

[Update?] Where to find the settings file for Lightning

Post by blausand »

Please somebody add an update to this thread; currently, prefs.js contents no CalDAV URLS.
Instead, it is bloated by kilobytes of shit.
IMHO prefs.js is a highly valuable file that should never be opened with write access unless serious config data is changed by the user.
I also think that the prefs.js should be adopted to use the Firefox Sync engine, formerly Mozilla Weave.
I'm going crazy as a 10+ years user maintaining half a dozen OSes on everchanging machines.
Post Reply