Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

restore report after database change

Hello everyone,

I am new to this forum and to using OCS Inventory. I did not perform the installation myself and I am using a Ubuntu 22.04 virtual machine with this service.

Nom du système : Linux x86_64

Version : 5.15.0-87-generic

RAM totale :1898 Mo

RAM disponible :623 Mo

CPU : Intel(R) Xeon(R) E-2314 CPU @ 2.80GHz

Distribution :Ubuntu 22.04.3 LTS

Version de PHP : 8.1.2

Serveur Web : Apache/2.4.52 (Ubuntu)

Serveur SQL : Ubuntu 22.04 version 10.6.12-MariaDB-0ubuntu0.22.04.1

Version OCSReports:2.12.0

When I arrived, the service was not fully functional. 

Remounting it on the server using the agents installed on the machines in the park properly brought back the computers with their information and installed software. 

However, the homepage was completely blank with only the top banner, and the software part of the park was empty.

I did some research and came across the following link: https://ask.ocsinventory-ng.org/14287/all-software-tab-empty-in-ocs-inventory-server?show=14287#q14287

Having exactly the same problem as this gentleman, I followed the steps to add the 'software_link' table to my database. For the creation, I referred to the GitHub link below: https://github.com/OCSInventory-NG/OCSInventory-ocsreports/blob/master/files/ocsbase_new.sql

DROP TABLE IF EXISTS `software_link`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `software_link` (
  `ID` bigint NOT NULL AUTO_INCREMENT,
  `NAME_ID` int NOT NULL,
  `PUBLISHER_ID` int NOT NULL,
  `VERSION_ID` int NOT NULL,
  `CATEGORY_ID` int DEFAULT NULL,
  `IDENTIFIER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `COUNT` int DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `NAME_ID` (`NAME_ID`),
  KEY `PUBLISHER_ID` (`PUBLISHER_ID`),
  KEY `VERSION_ID` (`VERSION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `software_link`
--

LOCK TABLES `software_link` WRITE;
/*!40000 ALTER TABLE `software_link` DISABLE KEYS */;
/*!40000 ALTER TABLE `software_link` ENABLE KEYS */;
UNLOCK TABLES;

This did not have the desired effect; I did not retrieve the 'all_software' functionality, but the dashboards on the homepage appeared. 

So, in a moment of madness, I copied the entire GitHub content into my database.

I suspect this reset the database. At least I started afresh. 

The only issue now is that I would like the agents to report the data again, but nothing seems to be happening. Do you think I can retrieve anything from this virtual machine, or should I reload my backup?

Thank you to those who are willing to help.

Best regards,

in OCS Inventory NG server for Unix by (160 points)

3 Answers

0 votes
The best way is to create a NEW server, following a tutorial you could find here.

On a new VM with last OS version (I suggest Debian 12), you install all requirements and use the SAME version of OCS server than old server. Then you backup mysql database and restore it on new server. And you upgrade the new server up to the OCS version you want (I sugget 2.11.1 or 2.12). You need also use old certificate if you use https.

For finishing, you stop old server, change ip address for new and reboot
by (19.3k points)
0 votes

Hello,

I restore the VM, that work again. i always have the same problem like https://ask.ocsinventory-ng.org/14287/all-software-tab-empty-in-ocs-inventory-server?show=14287#q14287

i only try to add 'sofware_link' in my database.

but that just ADD the front dashboard on Home page

thank for your help.

I will try to solve this

by (160 points)
0 votes
You need to check the level of database (gui_version) and all structure of your database.

For this, you need to follow scripts in update/scripts, and you need to add cron task about software table ...
by (19.3k points)
 
Powered by Question2Answer
...