1

On my main machine I am running Thunderbird with Lightning and have several CalDAV calendars connected. Furthermore there is also a CardDAV address book hooked up.

How can I transfer those CalDAV and CardDAV connections to a further machine?

To get the mentioned connections available on a second machine I have the following options:

  1. Create all connections completely from scratch (-> annoying)
  2. Copy the whole directory ~/.thunderbird to the new machine (-> impractical, because mail profiles would be copied as well)
  3. Copy only necessary files for calendars and the address book to the new machine (-> desired)

I want to avoid setting it up by hand. So: Which files do I have to copy from ~/.thunderbird?

My guess is something like:

  • File storage.db
  • File prefs.js (only the lines with "calendar")
  • Directory calendar-data

But where is the connection for CardDAV stored?

4
  • (Three bounties on three websites - impressive.) Question: Why don't you add or drop one such connection and check which files have changed in the ~/.thunderbird folder (taking beforehand a copy of the folder)?
    – harrymc
    Commented Dec 8, 2018 at 12:47
  • @harrymc: Thanks for your comment! Yes, the bounties have been made because it seems to be difficult to get an answer for this. :-) To answer your question: How can I compare which files have changed after deletion? I think this should not be done by hand, no?
    – Dave
    Commented Dec 10, 2018 at 0:02
  • You seem to be on Linux, where the tool is diff.
    – harrymc
    Commented Dec 10, 2018 at 8:13
  • 1
    I know this plays havoc with your bounty strategy, but you probably should ask them as separate questions. The CardDAV support should have come in through the old GAB support (global address book), which was originally LDAP based... and the CalDAV is via the extension... (AFAIK, I stopped contributing before CardDAV landed...)
    – benc
    Commented Dec 15, 2018 at 0:49

5 Answers 5

2

I suggest the following procedure to find out the CalDAV and CardDAV connections files:

  • Take a copy of the ~/.thunderbird folder
  • Add or drop one such connection
  • Check which files have changed
  • Compare the changed files using diff if they are textual in nature and if you would like to ensure you are copying the right files (or if you are curious about the syntax).
1

CardDAV file location on server should be in a path similar to the following:

~/.config/radicale/collections/contact/AddressBook.vcf
1
  • Oh, I am sorry for this misunderstanding: I am asking about usual Thunderbird for Desktop...
    – Dave
    Commented Dec 12, 2018 at 21:07
1

Disclaimer: I don't know anything about CalDAV and CardDAV and how Thunderbird handles them. However, I hope I can give some general guidelines.

Comparing directory trees and files in Linux using a graphical UI

Some of the other answers / comments have proposed to take a backup of your profile, delete one of the CalDAV / CardDAV connections, and check what has changed in the profile. I think that this is a very good idea if you really want to take the time (which could be a lot) and research the problem.

However, I also think that using diff for that purpose (and in general) is a torture. Since you are using Thunderbird, you are on a graphical desktop and thus can use meld, a graphical application with a nice UI which finally makes comparing whole directory trees in Linux a pleasure. If you are using a reasonable Linux distribution, meld should be available by means of your package manager.

Finding a non-perfect, but quick-and-working solution

While I understand that you would like to have the perfect solution and want to understand in detail what is happening, it might sometimes be better to be pragmatic (notably if there is some sort of time pressure).

I think we agree that deleting something usually takes no time compared to researching a problem or creating something. So I would just copy the whole Thunderbird profile from the main machine to the second one and then delete all mail accounts on the second one.

Since deleting a mail account does not necessarily remove the local data (in case of POP3) or the cached / synchronized data (in case of IMAP) associated with that account from the local file system, we need to do an extra step if we want to save disk space or if we have privacy concerns:

Before deleting an account, select the submenu entry Server Settings for that account in the left pane, then copy the location in the line labeled Local directory to a safe place, e.g. a text file. After having deleted the account itself, delete that directory. By this step, you are deleting the actual messages associated with the respective account from the local file system.

Please note that there are other files which you might want to delete, for example the address books (*.mab) and various other .sqlite files which might reveal personal data. This might or might not be a problem in your case. This additional data usually does not take up much disk space, so you might just leave it in place if you don't have privacy concerns.

If you would like to know more about the Thunderbird profile folder layout, you could use this starting point.

2
  • Thanks a lot for your reply! Unfortunately it seems there is no comfortable solution to copy only the CalDAV/CardDAV-connections to a further machine. It only seems to be possible to copy the mentioned files and remove all correspoinding mail content... :-(
    – Dave
    Commented Dec 15, 2018 at 20:17
  • If it is worth the effort, you could still copy your profile folder (i.e. take a backup), remove one of the CardDAV connections in the normal profile folder (from within the Thunderbird UI), and compare the old (backup) profile and the normal one. Thanks to meld, this should not take too much time. Unfortunately, I can't help here because I even wouldn't know how to setup a CardDAV / CalDAV connection. I never have used these technologies ...
    – Binarus
    Commented Dec 16, 2018 at 0:52
1

Try this: https://syncthing.net/

It is peer to peer. So when the client is online (network) syncthing, what is running in the background sync the files. It is working with macOS, Windows and Linux. Sync the hole thunderbird folder. After the first sync it syncs only the files hat have changed.

-1

to copy the CardBook settings, you just have to copy the file prefs.js and the storage and cardbook folders

2
  • This won't help, because it will also copy mailaccount settings.
    – Dave
    Commented Dec 15, 2018 at 20:12
  • ok edit your prefs.js and extract all strings starting with extension.cardbook Commented Dec 16, 2018 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .