Hello,
At :
if (( $CONFIG_dryrun )); then
case "${CONFIG_mysql_dump_compression}" in
'gzip')
echo "dry-running: mysqldump --user=${CONFIG_mysql_dump_username} --password=${CONFIG_mysql_dump_password} --host=${CONFIG_mysql_dump_host} ${opt[@]} $@ | gzip_compression > ${cfname}"
Should add :
+++++++ ret=0 # (after every case step)
And remove return 0 from that if (so rotating code can be runned)
The return 0 should be moved to:
if (( $ret == 0 )); then
echo "Rotating $(( ${rotation}/${rotation_divisor} )) ${rotation_string} backups for ${name}"
if (( $CONFIG_dryrun )); then
find "${CONFIG_backup_dir}/${subfolder}${subsubfolder}" -mtime +"${rotation}" -type f -exec echo "dry-running: rm" {} \;
return 0;
I hope you understand what I am saying
Regards,