Koozali.org: home of the SME Server

Migrate OCS and GLPI

Offline OzMoosis

  • ***
  • 46
  • +0/-0
Migrate OCS and GLPI
« on: November 30, 2007, 01:32:01 PM »
Hi all,

I'm migrating OCS and GLPI  to a different SME server. I've installed the new version of Inventory tools on one server and have created a mysql-dump file of the databases on the old server. My question is: how to import the dump-files into mysql on the new server? The command is something like:

mysql ocsweb -h host-name -u user-id -psupersecretpassword < ocsweb-dump.sql

Is that syntax correct?

And what (if any) are the host-name, user-id and password for the two databases ocsweb and glpi?

Thanks,

Oz

Offline andy_wismer

  • *
  • 107
  • +0/-0
    • ANWI-Net
Re: Migrate OCS and GLPI
« Reply #1 on: December 14, 2007, 12:55:50 AM »
Hi Oz

First transfer the mysql-dump to the new server using ssh, ftp or whatever.

On the new server, using root you don't need a password locally, so

# mysql ocsweb < ocsweb-dump.sql

should do as requested...

YMMV.

Andy

Offline OzMoosis

  • ***
  • 46
  • +0/-0
Re: Migrate OCS and GLPI
« Reply #2 on: December 18, 2007, 09:58:51 AM »
Thanks Andy,

that worked with one hiccup: after importing the two dumps (ocsweb and glpi) the connection between GLPI and the OCS_NG database didn't work. It turned out that the password had to be copied from /opt/inventory/ocs/ocsreports/dbconfig.inc.php to the config screen in GLPI Administration > Setup > OCSNG Mode. (I haven't found which file that is in GLPI). The password is the string not including the quotes, for anyone with the same problem.

Oz

Offline cool34000

  • *
  • 339
  • +0/-0
Re: Migrate OCS and GLPI
« Reply #3 on: December 18, 2007, 10:06:31 PM »
Hi,

Quote from: OzMoosis
that worked with one hiccup: after importing the two dumps (ocsweb and glpi) the connection between GLPI and the OCS_NG database didn't work.
You were so close! The only command missing was:
Code: [Select]
signal-event domain-modify

http://wiki.contribs.org/OCS_Inventory_Tools#Special_commands
Quote from: Wiki
After any change to OCS or GLPI configuration, you should apply modifications by typing the following at the prompt:
 signal-event domain-modify
It will expand and restart needed templates and services in one command!

http://wiki.contribs.org/OCS_Inventory_Tools#Importing_ocsagent.exe_in_MySQL
Quote from: Wiki
Warning:
install.php has reset ocs password to 'ocs'. Re-apply your changes with following command:
signal-event domain-modify
This will also reset chmod to 440 on dbconfig.inc.php


Offline OzMoosis

  • ***
  • 46
  • +0/-0
Re: Migrate OCS and GLPI
« Reply #4 on: December 19, 2007, 09:33:59 AM »
Hi Cool34000,

I hadn't realised that the domain-modify command applied to what I was doing. The warning about the changed password is in the section about importing ocsagent.exe. I hadn't even looked there...

Would you be able to add a section to the OCS Inventory Tools Wiki about importing MySQL dump files?

Also, adding the command syntax for changing ocs config ( config setprop ocs parameter option ) to the Wiki would be greatly appreciated!

By the way, this is one of my favorite contribs. I'm using it in an environment with 150+ PC's, it works perfectly!

Oz

Offline cool34000

  • *
  • 339
  • +0/-0
Re: Migrate OCS and GLPI
« Reply #5 on: December 19, 2007, 07:59:05 PM »
Hi Oz,

Thanks for your comments.
MySQL dump or import are not relative to OCS, but are generic info. If you're not comfortable with command line, you can use phpMyAdmin to do that. Quite easy, even for a noob!
I will add an example of configuration, but again, these are not OCS related but SME generic information...

Don't forget that you can modify the Wiki: just ask for write access to the Wiki to contribs.org team!