OCSInventory-NG / OCSInventory-Server

Communication server of OCS Inventory
http://www.ocsinventory-ng.org/
GNU General Public License v2.0
340 stars 138 forks source link

How to remove old deleted computers that were injected to a higher level server by ocsinventory-injector.pl #418

Closed jagarsoft closed 1 year ago

jagarsoft commented 1 year ago

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : ALL

Server informations

Perl version : ALL Mysql / Mariadb / Percona version : ALL

OCS Inventory informations

Ocs server version : ALL?

Problem's description

I have followed the instructions in Synchronisation-between-OCS-server-master-slaves and all goes fine.

However, when a computer is deleted from the lower server it is not removed from the higher server.

As a consequence, the higher server always has lots of old computers deleted from the lower server.

NOTE: -r flag only removes successfully injected files that it does not apply here

Thanks in advance

jagarsoft commented 1 year ago

I assume that ocsinventory-powershell-injector.ps1 has the same issue...

jagarsoft commented 1 year ago

Hello Some comment after a month? Some workaround instead? Thanks in advance again!

jagarsoft commented 1 year ago

If you could gimme some hints I'll try my very best

charleneauger commented 1 year ago

Hi @jagarsoft,

The solution we could offer you would be to enable the TRACE_DELETED configuration in Configuration > General configuration > Server on the slave server. This option allows you to log in the database all machine deletion actions from OCS (table deleted_equiv in db).

Then create a script that synchronizes and deletes the machines that are present in this table on the master server.

Best regards, Charlene

charleneauger commented 1 year ago

Hi,

Since there was no answer, I'll close this issue now.

Regards, Charlene