run_dbsmartbackup.sh - issue with redhat 6.x and postgresql
We have installed the scripts on some RedHat (6.7/6.8 - x64) and Ubuntu (14.04LTS/16.04LTS - x64). On these servers are running mongoDB (3.06/3.2.3) and postgresql (9.2/9.4/9.5). Issue:
- if we run manually /usr/bin/db_smart_backup /etc/dbsmartbackup/<db_type>.conf all is working perfectly, both for mongo and postgresql both in RedHat and Ubuntu environments.
- On RedHat servers, using run_dbsmartbackup.sh (from crontab, other script or manually) the mongo backup always start while the postgresql backup never starts.
Note - I was testing the log rotation Fix on a Centos 7.2x64 VM (with mongodb 3.2.6 and postgresql 9.4) and I´ve found that the problem does not appear with this OS. It seems to be a specific RHEL6 problem.
Could be an issue with text line tools (grep, egrep, awk, etc) ?
version on test environments cmd RHEL6 CentOS7 Ubuntu 14. Ubuntu 16 grep 2.20 2.20 2.16 2.24 egrep 2.20 2.20 2.16 2.24 sed 4.2.1 4.2.2 4.2.2 4.2.2 awk 3.1.7 4.0.2 1.3.3 (mawk) 4.1.3
Well, the run_dbsmartbackups.sh is only tested on debian for us and is tied to the debian layout.
We may have for example to adapt: https://github.com/kiorky/db_smart_backup/blob/master/run_dbsmartbackups.sh#L84 & https://github.com/kiorky/db_smart_backup/blob/master/run_dbsmartbackups.sh#L87