MozillaZine

Trying to re-load old Calendar data

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Ellakite
 
Posts: 7
Joined: December 5th, 2014, 10:23 pm

Post Posted March 14th, 2017, 1:51 pm

A friend of mine had his hard drive crash recently, and I'm helping him restore the information. I've gotten his e-mail restored, but so far I've had no luck restoring his Calendar data -- we've copied the data from a backup and loaded it into the Thunderbird directory on the new hard drive, but so far Thunderbird hasn't read any data from it.

I did see a note on this help board saying that the various versions of the Lightning calendar add-on will only read the database for that specific version, and my friend was not good at downloading/maintaining the software on his old computer... and as such, I'm sure that the version of Lightning he was using on the old hard drive is different from the version that I recently downloaded and installed. However, I have *NO* idea what version of Lightning he was using before. So: Is there any quick and easy way of determining what version of Lightning he was using when he created his old calendar data, or am I just going to have to start downloading and installing all the old versions of Lighting and hope that one of them eventually works? Thanks in advance.

DanRaisch
Moderator

User avatar
 
Posts: 117680
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted March 14th, 2017, 2:02 pm

Moving to Calendar forum.

Diane Vigil
 
Posts: 234
Joined: October 6th, 2010, 3:55 am

Post Posted March 15th, 2017, 11:52 am

I've used Thunderbird and Lightning for some time, and have upgraded Thunderbird a few times without any issues to the Lightning calendar.

When you say you "copied the data from a backup and loaded it into the Thunderbird directory on the new hard drive" -- what specifically did you copy? On my Windows machine, the calendars are saved as .ics files and some are in the C:\Users\username\AppData\Roaming\Thunderbird\Profiles\bunchofcharacters.AllAccts\calendar-data folder -- not in the Thunderbird program folder.

As I recall, if you can locate the .ics file(s), I believe you an import them directly into Lightning -- using:
Events and Tasks > Import

You MAY have to start a new calendar first, then import the .ics file (it's been a while since I did this).

Ellakite
 
Posts: 7
Joined: December 5th, 2014, 10:23 pm

Post Posted March 30th, 2017, 9:00 pm

Thanks, Diane.

I pretty much copied *EVERYTHING* (all files and subdirectories) from the old profile folder for Thunderbird into the new profile folder for Thunderbird. After I did this, Thunderbird did see the old e-mails immediately, but for whatever reason it didn't read either the old address book file or the calendar data right away. However, I did eventually find help on "importing" the old Address Book files which worked, so I'll see if your suggestion regarding using the Import function works for the Calendar issue. Thanks for the suggestion.

Ellakite
 
Posts: 7
Joined: December 5th, 2014, 10:23 pm

Post Posted March 31st, 2017, 5:04 pm

UPDATE:

Sadly, the advice that I got from Diane did not help me. My friend's calendar information is *NOT* stored as an .ics file, but rather as a file named "local.sqlite". I have tried overwriting the copy of this file that the latest version of Thunderbird creates with a copy of the file that we recovered from my friend's old (crashed) hard drive... but even after I do that and start Thunderbird, no calendar or task information appears in the Calendar section. I have taken a look at the old copy of the file through a text editor, and there does appear to be useful calendar and task data in it, but for whatever reason Thunderbird is not reading/displaying it.

Can't anybody help me figure out what I've got to do to get Thunderbird to read the old local.sqlite calendar file?

Ellakite
 
Posts: 7
Joined: December 5th, 2014, 10:23 pm

Post Posted April 3rd, 2017, 11:40 pm

Posting again, because I haven't seen any sort of reply in several days:

My friend's calendar information is *NOT* stored as an .ics file, but rather as a file named "local.sqlite". I have tried overwriting the copy of this file that the latest version of Thunderbird creates with a copy of the file that we recovered from my friend's old (crashed) hard drive... but even after I do that and restart Thunderbird, no calendar or task information appears in the Calendar section. I have taken a look at the old copy of the file through a text editor, and there does appear to be useful calendar and task data in it, but for whatever reason Thunderbird is not reading/displaying it.

Can't anybody help me figure out what I've got to do to get Thunderbird to read the old local.sqlite calendar file?

Decathlon
 
Posts: 48
Joined: February 27th, 2009, 2:02 am

Post Posted April 4th, 2017, 2:55 pm

Local calendars are stored as sqlite database in the local.sqlite file in your profile folder but it shouldn't be touched by the user. You can export/import your calendars as ics file from the "Events and Tasks" menu and this is useful also for backup reasons.

Probably your database got corrupted somehow and I don't think that using a different file from somewhere else, even with the same version of TB, will work.
You can take a look in the Error Console (menu Tools or Ctrl+Shift+J) to see the kind of errors that prevent Lightning to load the calendar but I don't know if it's possible to fix them.

There's a Thunderbird add-on called SQLite Manager (it exists also as a stand alone software, portable edition as well) that allows to open the local.sqlite file, as a sqlite database, just to see if the file is corrupted or to recover some important information.

Ellakite
 
Posts: 7
Joined: December 5th, 2014, 10:23 pm

Post Posted April 8th, 2017, 12:57 pm

Decathalon:

Thanks for confirming that I'm looking at the right file, and I recently discovered the SQLite Manager add-on (though I was unaware that it was available as a stand-alone program). The weird thing is that when I have SQLite Manager analyze and check the integrity of my friend's old calendar file, it doesn't return any errors. Further, I just checked Thunderbird's error console, and I'm not seing any messages related to the Calendar or Tasks features... so I'm more than a little puzzled by this.

As the case may be, I am an experienced database programmer -- mainly with PL/SQL, but I have dabbled with "regular" SQL. As such, I'm not giving up hope on retrieving my friend's old Calendar data and tasks just yet. The SQLite Manager tool has shown me that at much of the old data is there in recognizable form; I'm assuming that the issue is that certain "foreign key" values have been corrupted, but I'm now looking for a document which shows how the different tables in the local.sqlite database relate to each other; with that I might have a chance of exporting the data in a form that I could load into my friend's new calendar.

Dumb question: Is there any utility out there which will enable me to take an old local.sqlite file and create an .ics backup file from it? If I can do that, then that might be the quickest and easiest way to recover my friend's data.

Thanks for the input.

Return to Calendar


Who is online

Users browsing this forum: No registered users and 0 guests