.sql from Configuration Save is bloated



  • Build 7180 on CentOS7.1.1503

    Performing my monthly backups I have encountered one server that upon selecting Configuration Save from Fog Settings, has output a 927 MiB .sql .

    Ordinarily I would expect a 4-9 MiB file.

    What can I do to fix/trim this sucker down to size?

    Host and Image export file sizes are normal.



  • You betcha. thx again!


  • Senior Developer

    @sudburr Future reference, without having to recreate the table, just run:

    truncate table `fog`.`history`;


  • Thanks Tom! It was indeed the history table. I did the following for happy, happy, joy, joy.

    mysql -u root -p
    use fog;
    DROP TABLE IF EXISTS `history`;
    CREATE TABLE `history` (
      `hID` int(11) NOT NULL AUTO_INCREMENT,
      `hText` longtext NOT NULL,
      `hUser` varchar(200) NOT NULL,
      `hTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `hIP` varchar(50) NOT NULL,
      PRIMARY KEY (`hID`)
    ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
    
    

  • Senior Developer

    For a small period of time I had been recording EVERYTHING to the db in the history table. This mean EVERYTHING. All items that got updated (of which hosts update every time they checkin), login’s, imaging tasks, etc… This was a means for me trying to get things a bit more debugging friendly but would cause the “bloating” as you describe. To fix, simple truncate the history table, then see if backing up would be smaller. (It should be much smaller.)

    Sorry for trying to do something in an attempt to make it more debugging friendly and causing such a weird problem. I’m not sorry for trying to do these things directly but rather the “effects” of what it would do.


Log in to reply
 

395
Online

38729
Users

10555
Topics

99942
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.