Author Topic: HOW to move data from old failed server to new one  (Read 4210 times)

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
HOW to move data from old failed server to new one
« on: March 01, 2011, 01:07:20 am »
How can the data be moved from an old failed server to a new one?

All I'm interested in is moving the e-mails of the users, the configuration can be re-done quickly...

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: HOW to move data from old failed server to new one
« Reply #1 on: March 01, 2011, 03:27:09 am »
Is this Zentyal 2 on the old server?  Are you talking about Zarafa?  If it is Zarafa, install Mysql-Admin on the Zentyal box and perform a backup of the Zarafa catalog.  Then just move the backup to the current server and reload.  If the server is dead dead, you can always copy the hard drive to a virtual machine drive and boot it that way.

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: HOW to move data from old failed server to new one
« Reply #2 on: March 01, 2011, 05:44:25 am »
it is zentyal 2... yes, zarafa needs to be backed up.

Can I just move /var/mysql to the new server - isn't that the same? What do you mean by backing up the zarafa catalog via mysql admin? Do you mean installing phpmyadmin as mysql admin?

Josep

  • Zen Samurai
  • ****
  • Posts: 255
  • Karma: +6/-0
    • View Profile
Re: HOW to move data from old failed server to new one
« Reply #3 on: March 01, 2011, 11:07:17 am »
This page, by Trym, may help you: http://how-to.solheimsvollen.net/HOW-TO_Zentyal_2_Backup_and_Disaster_Recovery.html.
It explains how to backup and restore the Zarafa DB.

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: HOW to move data from old failed server to new one
« Reply #4 on: March 03, 2011, 10:33:42 pm »
that does help, but it doesn't really answer the question.

Can I install zentyal on the new box, and just restore the database on it to restore all e-mail? Will that be enough?

The page you linked to is backing up / restoring everything - and my zentyal is completely mis-configured and .. well, it spews out errors on save, etc - so I just want to move the data and import in on a newly setup/configured install.

Is there an easy way of doing that?

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: HOW to move data from old failed server to new one
« Reply #5 on: March 09, 2011, 07:30:55 pm »
only zarafa mailboxes need to be moved. What I learned though, is that if I only dump the db, the users (newly recreated users on the new box) will have to be somehow linked to the db. That is not documented... and I don't know how to do it.

Export of config will not work as the old config is faulty and breaks on save.

Trym

  • Zen Warrior
  • ***
  • Posts: 117
  • Karma: +1/-0
    • View Profile
Re: HOW to move data from old failed server to new one
« Reply #6 on: March 10, 2011, 12:16:36 am »
If the old misconfigured server is halfway up and running you can do the following:

Make a dump of the zarafa-database. (Use the script from the how-to.)
Save a configuration backup from System/Import-export configuration. (Doesn't matter if it's broken, we're only interested in the users saved in it.) If that doesn't work, see if there's a /var/lib/ebox/extra-backup-data/confbackup.tar you can copy instead.

On the new server, type/paste in the scripts from the how-to.

Rename the configuration-backup-file to confbackup.tar and place in in /backup.
Copy the gzipped zarafa-dump to /backup.

Run "/scripts/restoremodule users" (You may have to install some software-modules here. Do so, and remove them later if you don't need them all.)

run "/scripts/rebuildzarafa"

and "/scripts/restoremodule users" again. (For some strange reason one user will not have zarafa enabled if you don't do this again.)

You can configure the rest of the "new" server by hand. This is basically following the HOW-TO but just skipping the backup-and-restore-from-remote-server bit.

::Trym
« Last Edit: March 11, 2011, 01:30:32 pm by Trym »