MozillaZine

Is it possible to combine two Calendar local.sqlite files?

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Code Name

User avatar
 
Posts: 68
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Post Posted June 25th, 2020, 2:07 pm

Thunderbird 68.9.0
Windows 10

I recently had a harddrive fail on my 7 year-old PC so I replaced the PC with a brand new PC. The failed PC was being backed-up by Carbonite Plus so I was able to easily get all my docs, pictures, music and videos installed back on the new PC without any problem. I was finally able to figure out how to get my Archived emails back on the new PC, but I'm having trouble figuring out how best to handle the Calendar, as I have a rather unique problem.

My new PC has my most recent Calendar Events from Carbonite that go back to June 2016, which is the date my old PC's operating system failed and had to be reinstalled. I have actually found my old pre-2016 Calendar Events files (with Events dated from 2013 thru June 2016). I'm wondering if there is some way that I can combine/merge this old (2013-June 2016) local.sqlite file with my current local.sqlite file so that I can have a complete rebuild of my Calendar Events from 2013 thru current date.

I would need to somehow either (a) combine/merge two different sets of local.sqlite files into a single file, or (b) if it is even possible just add the old (2013 - June 2016) local.sqlite file as a 2nd local.sqlite file in my calendar-data file, thus having two local.sqlite files. I'm not sure the latter is even possible. Obviously choice 'b' (just adding the 2nd local.sqlite file to my calendar-data file in Profiles) would be the easiest for me to do. Can anyone answer (with certainty) if that is okay to do? I'm afraid to try it without confirmation that it is okay to do it.

'If' I can have two (2) local.sqlite files (in order for me to have 'all' my Events from 2013 thru current), do I also need to add the associated old calendar.ics files along with the old local.sqlite file? That means I would have two (2) sets of local.sqlite files and two (2) sets of calendar.ics files on one Profile. (I don't think I would need to add the associated prefs.js file because I understand the prefs.js file only handles 'changed settings from the default values' - and only those 'changes' are written to the prefs.js file.)

I need confirmation that having two sets of calendar-data local.sqlite files, and maybe two sets of calendar.ics files, on my current default Profile will accomplish what I want and not cause any harm.

Keep in mind that since June of 2016 (when I had to reinstall Windows on my old PC) I have not had these pre-June 2016 Events on my Calendar, so it is not essential that I add them back to my Calendar now. The old pre-2016 Events would be nice to have, but I rarely look at old Events. That said, I don't know that attempting to add those old Events is really worth the effort...

Any advice, help and/or information on what I need to do (or should do) would be much appreciated.
Politicians and Diapers must be changed often for the exact same reason...

Code Name

User avatar
 
Posts: 68
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Post Posted June 26th, 2020, 11:57 am

Well...

I learned that you cannot have two (2) local.sqlite files in your Thunderbird calendar-data file. If you try pasteing another (2nd) local.sqlite file to the calender-data it just replaces it - you still end up with just one local.sqlite file. I should have known that...

I also learned that you better manually save your Calendar(s) .ics files to a USB Drive every month or so. I say that because when I was playing around trying to figure out if it was [even] possible to somehow combine/merge the two local.sqlite Calendar files I [somehow] installed the old Calendar .ics file (I guess from one of the old calendar-data files), but I was not able to retrieve my most recent (current) primary Calendar back without importing it from my USB Drive where I had just recently saved it along with my other Calendars .ics files and my Address Book .cvs file. Thankfully, I had manually saved all my Calendar's .ics files to a USB Drive...so I was able to Import it back into the Thunderbird Calendar. I was under the belief that my Thunderbird Calendar .ics files were somewhere in my Windows 10 C: Drive under some name like 'storage'. I surely couldn't find my Calendar .ics files anywhere on my computer.

So, my new PC is back to where it was , missing those 2013 thru June 2016 Calendars Events from an old backup.

I wish Thunderbird made it easier to move/retrieve Mail and Calendar files from a backup (e.g. Carbonite). I've never tried moving files from a good/working old PC to a new PC, because I've always had to do it from a backup due to the old PC having a corrupted OS that needed to be freshly installed or a harddrive failure.

Once a month I am now backing-up to a USB Drive my various [calendar] .ics files which is easily done directly from the TB Calendar, and also my Thunderbird 'Profile' off my PC's C: Drive (This PC > OS (C:) > Users > name > AppData > Roaming > Thunderbird > Profiles ('Profiles' is the target file).

Maybe this thread will help someone else with a similar need/problem...
Politicians and Diapers must be changed often for the exact same reason...

Code Name

User avatar
 
Posts: 68
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Post Posted June 30th, 2020, 5:44 pm

So...

In my spare time I have rebuilt my Calendar with all the Calendar Events I was missing from 2013 thru June, 2016. I decided to use the old local.sqlite file and open it with Notepad and start from the bottom and pick out all the missing Events and add them to my Thunderbird Calendar. I had hundreds of Events and there was a gazillion lines of code, but I got pretty good at picking out the 'Description' and was able to do a lot of Copying & Pasteing. I now have my complete Calendar back with all Events from 2013 thru today.

As I mentioned in the previous post, from now on I will religiously perform a monthly backup to a USB Drive of my Calendar .ics files (directly from the Calendar) as well as backup my Thunderbird 'Profile' file from my PC's C: Drive. I will never again end up with missing more than one month's worth of Thunderbird Mail or Calendar Events if/when something happens to my PC again.

There's still one thing I'd like to find out. Since the local.sqlite file contains all the Calendar Event entries - what do the Calendar .ics files contain?
Last edited by Code Name on July 1st, 2020, 11:54 am, edited 2 times in total.
Politicians and Diapers must be changed often for the exact same reason...

morat
 
Posts: 3791
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 30th, 2020, 7:40 pm

The iCalendar .ics file contains the import data.

Excel imports a comma separated values .csv file, then saves as a spreadsheet .xls file.

Thunderbird imports an iCalendar .ics file, then saves as a database .sqlite file.

http://en.wikipedia.org/wiki/iCalendar

Code Name

User avatar
 
Posts: 68
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Post Posted July 1st, 2020, 11:51 am

morat wrote:The iCalendar .ics file contains the import data.

Excel imports a comma separated values .csv file, then saves as a spreadsheet .xls file.

Thunderbird imports an iCalendar .ics file, then saves as a database .sqlite file.

http://en.wikipedia.org/wiki/iCalendar


Got it ... I think. :-k

Thank you!
Politicians and Diapers must be changed often for the exact same reason...

Return to Calendar


Who is online

Users browsing this forum: No registered users and 2 guests