Author Topic: Zarafa Migration  (Read 1504 times)

endersen007

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Zarafa Migration
« on: April 10, 2013, 12:26:31 pm »
Hello everybody,

I had a big problem after a Zentyal Update (No Answer from Zentyal with the tickets 6348) and the only way to solve the problem was to do a fresh install of Zentyal.

Now my new problem.

I had to re-configure the whole box because the backup was not working at all. So it means the the user ID has changed in the database and I would like to restore all old emails from one Zarafa DB to the other one. These 2 databases are on the same box.
Zarafa Old database : zarafa_old
Zarafa used DB: zarafa

I have found a command to transfer one user mailbox to another with /usr/bin/zarafa-admin --hook-store stored_uid -u username, but how to transfer to one DB to the other one.

Please help.

Cheers

Cédric

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Zarafa Migration
« Reply #1 on: April 12, 2013, 12:49:25 am »
Use mysqldump to take a backup of the old database (or the bench tool).
Edit the dump file with a text editor to change all instances of zarafa_old to zarafa.
Restore the dump as you would any backup.
Get busy reconnecting users ;-)

endersen007

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Zarafa Migration
« Reply #2 on: April 12, 2013, 08:20:51 am »
Thanks half_life,

But my problem is how to restore only one user?

Example:
UsernameUser ID OldUser ID New
user137
user243

The config has changed and the userid too. The zarafa_old is already a mysqldump but with an other config.

Thanks

Cédric