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 2024-04-18 09:18:26

SomeDude
Member
Registered: 2023-11-22
Posts: 37

How to Copy GLPI to a new Database

Hello,

we are in the finishing steps of glpi on our dev system now my question is how can we drop GLPI to our Prod database without losing the Settings and rules we made but not copying all our test tickets, computers etc. so we start the id´s back at 1 so to say.

I really hope for some information on this topic.

Offline

#2 2024-04-18 10:33:05

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,171

Re: How to Copy GLPI to a new Database

if you want to start  object (ticket, computer, monitor....)  from 1  i see 2 ways for that

1) you should also delete any record refering to object(tasks, followups, history, tickets_items, or infocoms, links ....) this means many tables to clean  (at least every table containing object_id column, or itemtype="object"     

check this : SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = ('tickets_id') AND TABLE_SCHEMA='glpi';   this returns 15 tables
SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = ('itemtype') AND TABLE_SCHEMA='glpi';  chekt in these tables where itemtype= "object" => do you realy want to delete them ( preferences, savedsearch, ....

2)start from an new database and restore only  tables containing your setting ....

I don't advise trying this as a little error can lead to big problems....
I would only use mass action to delete objects  and dont car if first tiket as Number 9526


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

Board footer

Powered by FluxBB