Do you have your OpenAudit setup so you can run queries against the database (PHPMyAdmin, Adminer or some other tool)? It should be the case that your duplicate systems have a recent value for First Seen. So you could filter for recently added system and set them to deleted.
Review duplicates: [code] SELECT system.name, system.id, system.status, system.first_seen, system.hostname FROM system WHERE (system.name) IN (SELECT Tmp.name FROM system AS Tmp GROUP BY Tmp.name HAVING Count(*) > 1) ORDER BY system.id, system.name [/code]
Filter for recently added systems. Adjust date as necessary to filter duplicates. [code] SELECT system.id, system.name, system.hostname, system.first_seen FROM system WHERE DATE(system.first_seen) > '2018-02-10' [/code]
Set the recently added (duplicates) to deleted: [code] UPDATE system SET system.status = "deleted" where Date(system.first_seen) > '2018-02-10' [/code]
It would probably be a good idea to take a backup before, after and frequently while doing this.
|