You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-08-18 19:07:46

tharris6012
Member
Registered: 2019-12-04
Posts: 30

Data base migration

Hi.
I have a GLPI server that is a physical box. I have created another GLPI server as a virtual machine. I would like to export the database from the physical box GLPI to the virtual machine GLPI but I don't know how to go about doing it. Any help or suggestions will be greatly appreciated.

Offline

#2 2021-08-19 06:09:45

gopalakrishna99
Member
Registered: 2021-06-07
Posts: 20

Re: Data base migration

Hi

Could you please let me know which database(mysql or any other databases) are you using in GLPI

Last edited by gopalakrishna99 (2021-08-19 06:10:28)

Offline

#3 2021-08-19 17:59:26

tharris6012
Member
Registered: 2019-12-04
Posts: 30

Re: Data base migration

I'm using mysql  Ver 15.1 Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2.

Offline

#4 2021-08-20 06:31:58

gopalakrishna99
Member
Registered: 2021-06-07
Posts: 20

Re: Data base migration

Take mysqldump and import into another instance. But we have to change the db setting in glpi and restart the nginx or apache service

Offline

#5 2021-08-30 20:22:41

tharris6012
Member
Registered: 2019-12-04
Posts: 30

Re: Data base migration

Thanks, gopalakrishna99. Sorry about the late response. I'm wearing several hats these days. I was able to do the mysqldump on the physical server. I will now try to import it to the virtual instance. What db setting in glpi are you talking about having to change?

Offline

#6 2021-09-02 06:09:16

gopalakrishna99
Member
Registered: 2021-06-07
Posts: 20

Re: Data base migration

You have to change the ip address of mysql and username, password and database in /glpi/config_db.php

Offline

#7 2022-11-11 12:37:57

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: Data base migration

Hi. I have problem with import the database.

GLPI 10.0.4
/usr/sbin/mysqld  Ver 8.0.31-0ubuntu0.20.04.1

sudo mysqldump glpidb --user=root --password --source-data > /tmp/backupdatabase.sql


I have installed a new 10.0.5 server with:
mariadb  Ver 15.1 Distrib 10.6.7-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
Ubuntu 22

https://server_ip/glpi > and create new database: glpidb

sudo mysql -u root -p glpidb < /tmp/backupdatabase.sql

After that, I can't log in.

"Incorrect login or password
Connection to LDAP directory failed"

I can't log in on the local admin either.



Edit. Next try and I get:
PHP User Warning (512): Unable to decrypt string. It may have been crypted with another key. in /var/www/html/glpi/src/GLPIKey.php at line 428
Solved with: php bin/console glpi:security:change_key
But that only fixed the key error - still can't log in.


SOLVED:
I copied the entire glpi directory, imported the database (new server, same name and IP as old) - it works.

Last edited by WebGreg (2022-11-12 16:49:01)


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

Board footer

Powered by FluxBB