Updating calendar data database file
Hi,
As far as I can tell, the calendar database file calendar-data\local.sqlite is updated when I quit Thunderbird, but not every time I make a change to a calendar entry or task or at regular intervals. How can I trigger an update of local.sqlite before I run my daily backup?
Thanks, Malte
Alle antwoorden (2)
Ideally, you would exit Thunderbird before backing up anything in the ....Appdata/Roaming/Thunderbird folder. There are many files which get updated/ written to upon exit.
Including eg: preferences, address book, calendar, session data
In your 'profile name' folder is 'calendar-data' folder containing 'local.sqlite' - the main database file and also 'local.sqlite-wal' which is a 'Write Ahead Log' (wal) file. It's a type of cache file used to speed up process of what you viewing and upon exit it synchs with the local.sqlite to keep it up to date. So it may contain more recent data. 'local.sqlite-shm' is a shared memory file to faciliate the process.
So actual database is 'local.sqlite', but when running Thunderbird and using calendar it first checks to see if there is anything in the *-wal file because it may contains changes as yet not applied to the database. When you exit Thunderbird all the current data is written to the database file to update it before fully closing down.
Hence if you exit Thunderbird you will find the 'calendar-data' folder does not have any *-wal nor any *-shm files. They get recreated when you start up Thunderbird.
Thanks for the great explanation.
I understand that a timely exit would guarantee an up-to-date backup. Given all the additional files you're mentioning, can a backup performed while Thunderbird is running be used to restore the complete state of the application at the time of the backup or might some information get lost?
Would the API allow the implementation of an extension that triggers what Thunderbird does before exit, i.e. update all the data files?