[imp] Moveing contacts and prefrences
Brent J. Nordquist
bjn@horde.org
Thu, 14 Jun 2001 07:18:28 -0500 (CDT)
On Wed, 13 Jun 2001, Jacob Rush <jrush@swedishamerican.org> wrote:
> I am in the process of setting up a new server on a fresh install of imp
> (2.2.5) to replace our current slow hardware and imp (2.2.2). The only
> thing I am not sure of is how to move the contacts and prefrences over
> from the old server. Both are running mysql. Im sure this issue has
> come up in the mailing list before but I searched the archives and could
> not find a difinative answer.
Yes, I've had to do this too; it's pretty common I think. Basically, you
need to dump the contents of the imp_addr and imp_pref tables from the old
server:
$ mysqldump -uhordemgr -p[hordepass] horde imp_addr imp_pref >dump.sql
The result is a MySQL script which, if you run it on your new server, will
create the tables and populate them with the content. (You don't need to
bring the active_sessions data across; all the data in it is dynamically
created (PHPLIB sessions). Just make sure the table exists.)
> Also is there any imp spefic things I should watch out for when doing
> this. Im not sure how imp decides what contacts go to what user.
In both tables, the first column is called "user", and it's tied to your
mail and/or IMP server name (it's the value of $default->server in
horde/imp/config/defaults.php3) -- if that value on the new server is
different than the old server, you'll need to convert all those email
addresses, using a Perl one-liner or something.
[A final note to other people doing this from *before* IMP 2.2.2 -- there
were database format changes in that release that you probably want to
apply; the horde/scripts/database/mysql_alter.sql script will do this for
you.]
--
Brent J. Nordquist <bjn@horde.org> N0BJN
Yahoo!: Brent_Nordquist / AIM: BrentJNordquist / ICQ: 76158942