We recently upgraded the Spectrum from 10.3.1 to 10.4.2 and we noticed a poor/low compression on the DDMdb backup file.
As per the documentation we have update the post_olb_script for ddmdb backups:
./ddm_save.pl -f $backup_dir/db_$time_string.DDMDb > $backup_dir/ddm_backup.log 2>&1
The size of the DDMDB backup file (.mbi) has increased almost 4 times as compared to old backups in 10.3.1 (from 420 MB to 2 GB) using the above script, is this normal?
Release : 10.4.1
Component : Spectrum Core / SpectroSERVER
The default mysql compression method does not compress enough
There is an increase in size due to the change in mysql from myisam to innodb. Innodb is more of a transactional db and the event tables are broken up into days. This is normal as noted here:
However, the savefile is rather large with the default compression. To enable better compression, edit the $SPECROOT/SS/DDM/ddm_save.pl and change this entry:
Locate this section in the ddm_save.pl file:
$cmd = "$MYSQLBACKUP --defaults-file=$MYSQL_CONF --compress --user=$USERNAME --password=$PASSWORD --backup-dir=$backup_dir --backup-image=$backup_image --include-tables=\"^ddmdb\.\" --use-tts backup-to-image $REDIRECT_NULL_DEV";
And replace this parameter - To use --compress-method=lzma:
$cmd = "$MYSQLBACKUP --defaults-file=$MYSQL_CONF --compress-method=lzma --user=$USERNAME --password=$PASSWORD --backup-dir=$backup_dir --backup-image=$backup_image --include-tables=\"^ddmdb\.\" --use-tts backup-to-image $REDIRECT_NULL_DEV";
This will be changed in a future release of Spectrum.
The lzma compression method also has compression levels that can be specified
The compression level is meaningful only with zlib and LZMA algorithms.
Specify value from 0-9.
Specify value 0 to disable compression.
Specify value 1 for fastest compression.
Specify value 9 for best compression.
So --compress-method=lzma --compress-level=<LEVEL> can be specified. The higher compression levels may require more time to compress and complete the backup.
Also review this KB article:
Failure in the mysqlbackup during the execution of post_olb_script does not generate event and alarm