Author Topic: eBox 1.2 eGroupWare data restore from eBox 1.0 borked  (Read 3486 times)

Sam Graf

  • Guest
eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« on: July 26, 2009, 03:40:05 am »
Hi,

Since there is no upgrade path from eBox 1.0 yet I went the long way around and attempted an eGroupWare data restore to a new eBox 1.2 setup. Which appears not to work. I cannot get into eGroupWare, and the following errors are reported on the index page:

Code: [Select]
Error: Can't bind to LDAP server: cn=admin,dc=ebox! accounts_ldap::__construct / accounts::__construct / accounts::getInstance / egw::setup / egw::__construct / require_once(/phpgwapi/inc/functions.inc.php) / include(/var/lib/egroupware/header.inc.php)
Error: Can't bind to LDAP server: cn=admin,dc=ebox! accounts_ldap::__construct / accounts::__construct / CreateObject(phpgwapi.accounts)

This is pretty discouraging, to be honest, especially since there is no proper upgrade path. So 1) is there any way to recover the data on a new machine, and 2) is there any way to repair the 1.2 eGroupWare installation (from a backup of it's own, for example)?

Sam Graf

  • Guest
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #1 on: July 29, 2009, 03:09:42 pm »
I take it that there is no way to recover from the errors (since I can't restore a "clean" eBox 1.2 eGroupware database from the GUI) or to correctly transfer the database to a 1.2 installation (upgrading between versions is something eGroupware itself is supposed to be able to do, of course).

If true, that leaves my eGroupware installation orphaned at 1.4 on a 1.0 eBox (while eBox 1.3/1.4 is already in alpha ??? ). I really enjoy using eBox but I really need to know what the intention is regarding eGroupware data, because that will impact my decisions about how I am able to use eBox, obviously.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #2 on: July 29, 2009, 03:59:08 pm »
Hi,

First of all, I'm sorry for that. You must understand that there is no other path for the migration that the one you have tried. I don't know why it has failed and I don't know if that has anything to do with eBox. But let's see if we can fix it.

We need more data, please specifiy the exact steps you have followed so we can try to reproduce your issue.

Before restoring the backup, have you achieved to have egroupware 1.6 (with eBox 1.2) working without data? That's the first step, once you have egroupware well configured you can try to restore the backup, if then the restore fails, I bet it's an egroupware issue (not caused by eBox). If you can't get egroupware working without the data, then we'll try to help you if you give us more information.

Maybe not everything is lost, I hope you finally can restore your data ;)

Regards,

J. A. Calvo
Zentyal Server Lead Developer

Sam Graf

  • Guest
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #3 on: July 29, 2009, 05:35:09 pm »
I've never used eGroupware before so it could well be that I messed up somewhere. Here's what I did:

Set up eBox 1.2 for eGroupware use from scratch, including users, virtual e-mail address, etc., so I could make sure everything was working (working eGroupware e-mail, for example). As far as I could tell, everything was normal, though, of course, there was no data in there beyond the users.

I then took a backup of my eGroupware 1.4 data, made by eGroupware, and uploaded it to the eBox 1.2 installation. I also read about the normal eGroupware upgrade path at the eGroupware site, where they outline this procedure:

Quote
To Update your eGroupWare preserves your data!
The procedure depends on the type of the update package (tar, zip, rpm ...):

1. Go to your eGroupWare directory, usually 'egroupware' in your 'docroot', and save the file 'header.inc.php'.
2. Create a data backup of your database
3. depending on the package type: delete or uninstall (rpm) your old installation. You may keep it as a backup by renaming the installation: e.g. under Linux 'mv egroupware egroupware.old'
3. Install the new package into the same directory (named in 'header.inc.php')
4. Recover your old 'header.inc.php' by re-copying the backup.
5. Go to setup (e.g. http://domain/egroupware/setup) in the upper login window

I tested using the replaced header.inc.php but that seemed to break eGroupware completely (that is, the web interface stopped responding at all; as it is now, I do see the log in screen, though with the errors I posted), so in the end, of the steps outlined above, all I did was upload the database backup and restore the data using the eGroupware GUI. The result is as I described in my earlier post.

I did make an eGroupware backup before trying to restore the data from the "old" installation but I have no idea how to restore that backup to see if eGroupware recovers, since I cannot log into eGroupware at all now.

If I haven't given you enough information yet, please do let me know and I'll try to fill the gaps.

Thank you for your help!
« Last Edit: July 29, 2009, 05:40:13 pm by Sam Graf »

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #4 on: July 30, 2009, 12:48:00 am »
I don't know too much about eGroupware, but I don't think that restore an old header.inc.php is the good procedure to restore a backup. In fact that file is overwritten by eBox. You should only use the egroupware backup tool (through the web interface), to make the backup and restore it. Without touching any other file in the system.

Hope this helps!

Regards,

J. A. Calvo
Zentyal Server Lead Developer

Sam Graf

  • Guest
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #5 on: July 30, 2009, 01:03:56 am »
Well, that's what I did. I took an eGroupware backup from eBox 1.0 and restored it to eBox 1.2 eGroupware, all using the eGroupware backup and restore tools, and that's when it broke (without changing header.inc.php). Since I can't log back into eGroupware now I'm stuck with a broken eGroupware.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #6 on: July 30, 2009, 01:24:02 am »
If you followed the standard eGroupware backup/restore procedure, I'm afraid I can't help you. Have you tried asking this in the eGroupware forums?

As a last resort, try to do the following:

Execute /usr/share/ebox-egroupware/ebox-egroupware-regen-db, and then try to restore the backup again.

Regards,

J. A. Calvo
Zentyal Server Lead Developer

Sam Graf

  • Guest
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #7 on: July 30, 2009, 07:28:46 pm »
Sorry for the delay in getting to this.

Since I had nothing serious to lose I ran the command you provided and some interesting things happened. A series of warnings occurred during the run, but it did complete. The good news is that eGroupware's index/login page no longer displays the PHP errors I mentioned before. The "bad" news is that authentication is still broken -- I cannot log into eGroupware.

Interestingly, I went to the Dashboard to restart eGroupware, just to see if that would make any difference, and it no longer shows up in the Module Status section. eGroupware is clearly installed since I can navigate to the login page. And eGroupware still shows up as an installed component in Software Management (even after running ebox-software, just to be sure I wasn't seeing cached information). I haven't attempted an eBox restart since people are using this machine at the moment, but I can try that later.

I do appreciate you taking the time to help me with this. I haven't yet posted at the eGroupware forums until I'm sure some odd problem between eBox users and eGroupware on my machine isn't the cause.

If you need any additional information, I'll try to provide it.


J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #8 on: July 30, 2009, 11:04:51 pm »
So, you tried to restore the backup after executing that command and it worked? Or you just got egroupware working before trying to restore the data?

If you create a new user (not a existing one), can you log into egroupware? You can try also by reapplying a permission template to a existing user.

The module status disappearing issue is *really* strange... I can't figure why is that happening.

Thank you for the effort on testing it!

Regards,

J. A. Calvo
Zentyal Server Lead Developer

Sam Graf

  • Guest
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #9 on: July 30, 2009, 11:40:05 pm »
Sorry for not being clear. :-[ I couldn't try the restore again because I couldn't log in. The errors went away after executing the instruction, but at that point I still couldn't log in.

However, reapplying the permissions template did fix login for the one user I tried, and a new user works also. But it seems like the connection to the IMAP server is lost. I'll check that more thoroughly later.

I'll make a new backup of my existing eGroupware data and try the restore again, once e-mail is working. It'll have to be later, but I'll report as soon as I know something.

I'll also reboot the machine before posting again and see if the module status straightens itself out.

Thanks again!

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #10 on: July 31, 2009, 12:22:58 am »
If the data has been erased and the backup is not restored it's completely normal that you can't login with your old users. That's because the problem is fixed when you reapply the permission template. But that is not a problem, you can add a new admin user to restore the backup, but I think is not necessary. I mean, I think you can login into http://ebox_ip/egroupware/setup with the user ebox and the password located in /var/lib/ebox/conf/ebox-egroupware.passwd and restore backups from there.

Hope this helps, I'll wait for more feedback from you :)

Regards,

J. A. Calvo
Zentyal Server Lead Developer

Sam Graf

  • Guest
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #11 on: July 31, 2009, 04:54:32 pm »
OK, using a fresh eBox 1.0 eGroupware backup, made using the eGroupware GUI, I tried the restore to eBox 1.2, again using the eGroupware GUI. Again, things are broken. For example, on trying to enter eGroupware's e-mail module, this is what I get:

Code: [Select]
Database error

Invalid SQL: SELECT fm_id,fm_active,fm_realname,fm_organization,fm_emailaddress,fm_signatureid,fm_ic_hostname,fm_ic_port,fm_ic_username,fm_ic_password,fm_ic_encryption,fm_ic_validatecertificate,fm_ic_enable_sieve,fm_ic_sieve_server,fm_ic_sieve_port,fm_ic_folderstoshowinhome, fm_ic_trashfolder, fm_ic_sentfolder, fm_ic_draftfolder, fm_ic_templatefolder,fm_og_hostname,fm_og_port,fm_og_smtpauth,fm_og_username,fm_og_password FROM egw_felamimail_accounts  WHERE fm_owner=2001:
ERROR:  column "fm_signatureid" does not exist
LINE 1: ...ctive,fm_realname,fm_organization,fm_emailaddress,fm_signatu...

Some other things, however, seem to restore correctly -- an address book, for example.

If I restore the "clean" (default data) backup before logging out eGroupware seems to return to normal. I can log out and then log back in using my eBox user account, as normal.

With regard to eGroupware not showing up on the Dashboard's Module Status section, it so happens that I'm setting up another eBox 1.2 from scratch, and after installation and updates via apt (nothing more) there is no groupware module shown in the status section on that machine either. I thought I recalled that 1.2 displayed the module as "Groupware" in the status section, but I have been very busy so now am not confident in my recollection.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #12 on: July 31, 2009, 05:07:58 pm »
If some things are restored correctly and others like the mail are broken, I don't think it's related with eBox in anyway (but of course I can't be sure), I think you should ask in the eGroupware forums showing that error. Maybe they can give us any clue about the problem even in the case it were related with eBox.

The module status stuff is very very strange, are you sure there is no Groupware entry? Maybe the position of it has changed in the table??

Regards,

J. A. Calvo
Zentyal Server Lead Developer

Sam Graf

  • Guest
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #13 on: July 31, 2009, 06:16:56 pm »
 :) I don't blame you for wondering if I can see straight ... at this point I'm not sure myself. I'll attach a screen shot from the new machine I mentioned (just as a side note, not all the modules displayed as running are even enabled, a "problem" I've had throughout my experience with eBox -- which started with 0.11 I think).

I agree that it's time to take the restore problem to the eGroupware forums. I'll report back when I know something.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eBox 1.2 eGroupWare data restore from eBox 1.0 borked
« Reply #14 on: July 31, 2009, 06:41:01 pm »
Sorry, I misunderstood you!! For some reason I though you was talking about the "Module Status" menu, that's why I told you that it was really strange. It's completely normal that eGroupware doesn't appear in the dashboard, only services appear there, and it is not a service, the service associated to eGroupware is "webserver", because it uses the same Apache that the normal webserver module in eBox.

I hope things are more clear now :)

Good luck in the eGroupware forums! We are looking forward for your feedback ;)

Thanks for your effort testing eBox!

Regards,

J. A. Calvo
Zentyal Server Lead Developer