Page 1 of 1

database very large Frames.ibd: 34G Logs.ibd: 584M

Posted: Wed Mar 31, 2021 10:43 am
by fennec
Hi

how can I decrease database

/var/lib/mysql/zm/Frames.ibd: 34G
/var/lib/mysql/zm/Logs.ibd: 584M


Just use Video Writer and no log

I have 2to of video with 2 mins longer

Is it normal ?

thanks

Re: database very large Frames.ibd: 34G Logs.ibd: 584M

Posted: Thu Apr 01, 2021 12:18 pm
by burger
Did you upgrade from 1.28 or earlier? See https://wiki.zoneminder.com/MySQL#IBData_files_Large

Having ibd files too large can be from having the earlier DB format, MyISAM. Starting from 1.32, ZM uses innoDB which should avoid this issue.

Code: Select all

In ZoneMinder 1.28, I had an issue with the ibdata1 file in /var/lib/mysql/ growing too large. It includes some database 
information and in my 10GB root partition, was taking up 8GB. This was because the DB was not in InnoDB format. 
Zoneminder 1.32 and newer, defaults to InnoDB, and this section can be ignored.

The solutions I found were:

    backup zm database, delete zm db, delete ibdata file, then restore database How to Shrink/Purge Ibdata1 file

OR

    Move the ibdata file to another partition

OR

    Change DB type to InnoDB (requires backup, deletion, and restoring db, per first solution)