Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

moving global-messages-db.sqlite to a different location

809 views
Skip to first unread message

divmediat

unread,
Nov 8, 2009, 3:30:57 AM11/8/09
to
Is there a way to move the global-messages-db.sqlite in TB 3.b4 to a
different location than the profile?

I'm used to all sorts of hex editing if necessary .

regards,
Christian Ander

Nathan Tuggy

unread,
Nov 8, 2009, 12:06:00 PM11/8/09
to
To what purpose? Just moving the file does not seem like an obvious
thing to do, and it might help a lot if the ng knew what you are trying
to do with it. For example, are you trying to save disk space? share the
database? what?

Ben Bucksch

unread,
Nov 9, 2009, 3:07:57 PM11/9/09
to
On 08.11.2009 18:06, Nathan Tuggy wrote:
> To what purpose? Just moving the file does not seem like an obvious
> thing to do, and it might help a lot if the ng knew what you are
> trying to do with it. For example, are you trying to save disk space?

I, for one, think that gloda and the ImapMail / Mail dirs are too big to
be hiding as dotfiles or in the Windows profile. Just ~/.thunderbird/ is
about 1 GB for me, which is about 2/3 of my home dir (if I don't count
songbird and personal files).

I'd be good to allow the user (including UI) to choose the location, to
manage his disk space.

Nathan Tuggy

unread,
Nov 9, 2009, 9:32:08 PM11/9/09
to

That sounds reasonable to me, and I'd rather like that capability too,
actually.

I was trying to elicit a few more details from the OP to narrow down
what sort of answer would be necessary. (Especially as there does not
presently appear to be any generalized way to move the file in question.)

petenz

unread,
Nov 9, 2009, 10:49:54 PM11/9/09
to

I think it would be handy for there to be an easy way to manage the
location of one's entire profile folder - good for those who dual boot
or for backup situations where a specific folder is backed up regularly.

Andrew Sutherland

unread,
Nov 9, 2009, 11:53:18 PM11/9/09
to
On 11/09/2009 07:49 PM, petenz wrote:
> I think it would be handy for there to be an easy way to manage the
> location of one's entire profile folder - good for those who dual boot
> or for backup situations where a specific folder is backed up regularly.

You can already do this. profiles.ini allows you to point at a profile
anywhere.

Useful links:

http://support.mozilla.com/en-US/kb/Profiles
http://kb.mozillazine.org/Profile_folder_-_Thunderbird
http://kb.mozillazine.org/Profiles.ini_file

Andrew

Ben Bucksch

unread,
Nov 10, 2009, 11:43:53 AM11/10/09
to

That's great.

But doesn't solve the problem:
1) There needs to be UI for that, as normal users can have that problem
(my contact just told me that he has 4 GB of mail data)
2) It's important to differentiate primary user data (which can be
small) and (big) caches, as I have different backup stategies for these
kinds of data. gloda and ImapMail/ are both caches and huge.

Andrew Sutherland

unread,
Nov 10, 2009, 12:05:43 PM11/10/09
to
On 11/10/2009 08:43 AM, Ben Bucksch wrote:
> On 10.11.2009 05:53, Andrew Sutherland wrote:
> 1) There needs to be UI for that, as normal users can have that problem
> (my contact just told me that he has 4 GB of mail data)

The Profile Manager "Create Profile Wizard" lets you specify the folder
the profile should be created in. Sadly, there is no provision for
moving a profile.

> 2) It's important to differentiate primary user data (which can be
> small) and (big) caches, as I have different backup stategies for these
> kinds of data. gloda and ImapMail/ are both caches and huge.

I would argue the ImapMail directory structure is much more useful from
a backup perspective than the gloda database, but I agree with your
general premise that the profile directory (and our entire data storage
strategy) is not particularly friendly to most backup regimens involving
anything less than snapshot-able file-systems with copy-on-write-style
block-level semantics.

I don't suppose there is a standard among back-up programs where an
application can provide a definition file that explains what
files/folders are interesting and which are not?

Andrew

Wayne Mery

unread,
Nov 10, 2009, 1:07:26 PM11/10/09
to

in mozilla? ha!

since I've been bebopping some of these bugs recently:

https://bugzilla.mozilla.org/show_bug.cgi?id=345070
Move cache outside of the regular profile folder

https://bugzilla.mozilla.org/show_bug.cgi?id=147344
Breaking up the profile for roaming, sharing and performance

https://bugzilla.mozilla.org/show_bug.cgi?id=408156
Ability to split prefs into multiple files

Siddharth Agarwal

unread,
Nov 10, 2009, 9:39:54 PM11/10/09
to
On 10-11-2009 22:13, Ben Bucksch wrote:
> 2) It's important to differentiate primary user data (which can be
> small) and (big) caches, as I have different backup stategies for these
> kinds of data. gloda and ImapMail/ are both caches and huge.

To be honest, the right fix to this sounds like moving stuff to a cache
directory. Windows and OS X have this -- Linux doesn't, as the bug Wayne
linked points out.

I'd fully support moving global-messages-db.sqlite to the cache
directory, at least on platforms that support it.

Ben Bucksch

unread,
Nov 13, 2009, 2:27:25 PM11/13/09
to
On 10.11.2009 19:07, Wayne Mery wrote:
>>> 2) It's important to differentiate primary user data (which can be
>>> small) and (big) caches, as I have different backup stategies for these
>>> kinds of data. gloda and ImapMail/ are both caches and huge.
>>
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=345070
> Move cache outside of the regular profile folder

Sounds like the right approach. This basically directly addresses my
above concern of separating primary-source user data and cache into
separate locations. The location needs to be configurable, though.

Henrik Zawischa

unread,
Feb 16, 2011, 9:36:19 AM2/16/11
to
In a Windows network with roaming user profiles it would be desirable to seperate configuration data and content related files. It is no problem to redirect the mail- and imapmail-folders to a different location, eg. the "Local Settings" or "AppData\Local" part of the Windows user profile. But the global-messages-db.sqlite still sits with the roaming data, cannot be moved. I have seen files with about 0.5 GB. Way to big for a roaming Windows profile.

Henrik


Zagor

unread,
Dec 19, 2012, 11:39:15 AM12/19/12
to
Il giorno mercoledì 16 febbraio 2011 15:36:19 UTC+1, Henrik Zawischa ha scritto:
> In a Windows network with roaming user profiles it would be desirable to seperate configuration data and content related files. It is no problem to redirect the mail- and imapmail-folders to a different location, eg. the "Local Settings" or "AppData\Local" part of the Windows user profile. But the global-messages-db.sqlite still sits with the roaming data, cannot be moved. I have seen files with about 0.5 GB. Way to big for a roaming Windows profile.
>
> Henrik

I completely quote all this. This is the point: we need to move global-messages-db.sqlite file out of the roaming data of the Windows profile.

My enduring gratitude will go to the hero who will carry out this, together with a donation to the Mozilla Foundation :-)

Thank you

Andrea

Fabien Romano

unread,
Mar 19, 2022, 3:19:36 PM3/19/22
to
It's sad nothing changed on this topic. Not sure how others manage this problem. For those who may find the conversation, the only solution I find is to setup logon & logoff script through gpo in order to move this file and make it a symbolic link. It looks like it works and the file disapear from my roaming profile. I hope I'm done.

Note I also try to exclude the file from the roaming profile but windows gpo support folder exclusion, not files. Windows will also copy the file even if it's a link. I did not find this solution and I had to cook it so maybe some people around will find this helpfull.

The logon script will create a symbolic link from localappdata to appdata :
Get-ChildItem -Path "$env:localappdata\*" -Recurse -Filter global-messages-db.sqlite | % {
$destination = $(Join-Path "$env:appdata" $_.FullName.Replace("$env:localappdata\",""))
cmd /c mklink $destination $_.FullName
}

The logoff script check if the file is a symbolic link then delete it, otherwise it move the file to localappdata (the logon script will find it and create the symbolic link, before Thunderbird starts) :
function Test-ReparsePoint([string]$path) {
$file = Get-Item $path -Force -ea SilentlyContinue
return [bool]($file.Attributes -band [IO.FileAttributes]::ReparsePoint)
}
Get-ChildItem -Path "$env:appdata\*" -Recurse -Filter global-messages-db.sqlite | % {
if (Test-ReparsePoint($_.FullName)) {
Remove-Item $_.FullName
} else {
$destination = $(Join-Path "$env:localappdata" $_.FullName.Replace("$env:appdata\",""))
Move-Item -Path $_.FullName -Destination $destination
}
}

This can be done differently for sure, like moving the file instead of using a symbolic link. Does someone have a better solution ?

Fabien

ano nymo

unread,
May 6, 2022, 6:29:05 AM5/6/22
to
Fabien Romano schrieb am Samstag, 19. März 2022 um 20:19:36 UTC+1:

> This can be done differently for sure, like moving the file instead of using a symbolic link. Does someone have a better solution ?

In
%USERPROFILE%\AppData\Roaming\Thunderbird\profiles.ini

we have

[Profile0]
Name=default
IsRelative=0
Path=O:\Thunderbird
Default=1

[General]
StartWithLastProfile=1
Version=2

-----------
O:\ is the users home directory

On the backup server we have a rule not to backup files called "global-messages-db.sqlite"

So the whole profile is not copied at every login/logout and the global-messages-db.sqlite files don't clutter the backups.

Matthias
0 new messages