Project

General

Profile

Actions

Importing from sympa

There is a script to do that, called scripts/import.sympa.py. It tries to import configuration, subscribers, and archive for one list at a time. Not everything is imported, but most of it is... and the script is currently not very well tested. Though some real import were done successfully.

It uses the usual colibri settings in settings.py and colibrisettings.py (such as archive paths). This means that
  • you do not need to provide them again
  • double check those files before trying to import

You need to start the script from the main colibri directory. If you start it with no argument, you'll be given the usage:

% ./scripts/import.sympa.py
You need to supply exactly two arguments to this script:
 * the path for the main directory of sympa
 * the path for the web configuration file sympa.conf
 * the name of the mailing list to import

Example : scripts/import.sympa.py /opt/sympa /etc/sympa.conf test\@mysite.org

Here is an example

# ./scripts/import.sympa.py  /opt/sympa /vservers/web/etc/sympa.conf  xxx@freehackers.org
-> Created new list xxx@freehackers.org
-> Imported 37 subscribers, created 34 new users/profiles
-> Import archives from '/opt/sympa/arc/xxx@freehackers.org'
-> The colibri archive dir is '/usr/olocal/www-rw/colibri/rw/archives'
importing /opt/sympa/arc/xxx@freehackers.org/2008-06/arctxt -> /usr/olocal/www-rw/colibri/rw/archives/xxx@freehackers.org/2008/6/text
importing /opt/sympa/arc/xxx@freehackers.org/2007-05/arctxt -> /usr/olocal/www-rw/colibri/rw/archives/xxx@freehackers.org/2007/5/text
importing /opt/sympa/arc/xxx@freehackers.org/2005-05/arctxt -> /usr/olocal/www-rw/colibri/rw/archives/xxx@freehackers.org/2005/5/text
...

The script does a lot of checks, and should hopefully give meaningful message when a problem is found.

In this example, 3 subscribers already had an account in the database. They were recognized only using the email address, which is compared to all (primary and secondary) addresses known in the colibri database.

warning!!
Once the script was run, double check owner/group/permissions for the directories/files created in rw/archives.

Updated by Thomas Capricelli about 11 years ago ยท 3 revisions