Hello,
I just accidentally deleted the following file /var/lib/mysql/zm/Logs.ibd which was 2.7GB in size. Unfortunately I don't have a backup.
Was there anything system specific in the file or could I somehow replace the file? I don't really want to to uninstall zoneminder and reinstall it from scratch.
Thanks for ideas
Accidentally deleted /var/lib/mysql/zm/Logs.ibd
Re: Accidentally deleted /var/lib/mysql/zm/Logs.ibd
It’s a database problem. You’ve deleted the binary logs by the sounds of it. There must be a lot better places to get a response.
-
Re: Accidentally deleted /var/lib/mysql/zm/Logs.ibd
just a wild ass guess but this may be a place for you to start figuring out how to recreate the database table 'Logs'
https://github.com/ZoneMinder/zoneminde ... ql.in#L365
https://github.com/ZoneMinder/zoneminde ... ql.in#L365
Re: Accidentally deleted /var/lib/mysql/zm/Logs.ibd
To recreate the table:
- open a SQL prompt,
- select your ZM database,
- paste this:
That's for ZM version 1.34.23 - Other versions may be different.
- open a SQL prompt,
- select your ZM database,
- paste this:
Code: Select all
CREATE TABLE `Logs` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`TimeKey` decimal(16,6) NOT NULL,
`Component` varchar(32) NOT NULL,
`ServerId` int(10) unsigned DEFAULT NULL,
`Pid` int(10) DEFAULT NULL,
`Level` tinyint(3) NOT NULL,
`Code` char(3) NOT NULL,
`Message` text NOT NULL,
`File` varchar(255) DEFAULT NULL,
`Line` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`ID`),
KEY `TimeKey` (`TimeKey`),
KEY `Logs_TimeKey_idx` (`TimeKey`),
KEY `Logs_Level_idx` (`Level`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Re: Accidentally deleted /var/lib/mysql/zm/Logs.ibd
Thanks for the answers.
Unfortunately, it doesn't work to create the “Logs” table.
If I delete the table “Logs” first, then create the new one, it still tells me that it already exists, picture attached.
Unfortunately, I don't know exactly which version I have, in which table can I look it up?
Unfortunately, it doesn't work to create the “Logs” table.
If I delete the table “Logs” first, then create the new one, it still tells me that it already exists, picture attached.
Unfortunately, I don't know exactly which version I have, in which table can I look it up?
- Attachments
-
- zm logs.PNG (28.63 KiB) Viewed 1241 times