diff options
author | 2018-03-26 13:55:11 +0000 | |
---|---|---|
committer | 2018-03-26 13:55:11 +0000 | |
commit | cc7dca9a21765dca0ba336f27659a3852f6a15d9 (patch) | |
tree | 64d977bb0d28caa9eff96082041a8a53546da9ca /packages/base/src/files/install/mysql/bin/db_backup.sh | |
parent | c8bed1e392b935ec50aaeeb5fb82d25a9568b790 (diff) | |
parent | 669931e76de18aabb14f9ff873da4783f8c83d7a (diff) |
Merge "ONAP code change for log files consolidation"
Diffstat (limited to 'packages/base/src/files/install/mysql/bin/db_backup.sh')
-rw-r--r-- | packages/base/src/files/install/mysql/bin/db_backup.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/base/src/files/install/mysql/bin/db_backup.sh b/packages/base/src/files/install/mysql/bin/db_backup.sh index dca2017ff..75d15364f 100644 --- a/packages/base/src/files/install/mysql/bin/db_backup.sh +++ b/packages/base/src/files/install/mysql/bin/db_backup.sh @@ -63,6 +63,12 @@ function backup_database # MAIN +if [ -z ${POLICY_LOGS} ]; then + POLICY_LOGS=/var/log/onap +fi +mkdir -p $POLICY_LOGS/policy/db +LOG=$POLICY_LOGS/policy/db/db_backup_$DATE.log +ERR=$POLICY_LOGS/policy/db/db_backup_$DATE.err echo "db_backup.sh started ... `date`" | tee -a $LOG if [ $# -eq 3 ]; then DB_USER="${1}" @@ -71,8 +77,6 @@ if [ $# -eq 3 ]; then echo "DB_USER: $DB_USER" | tee -a $LOG DAILY_BACKUP_DIR=$POLICY_HOME/data/mysql/$DATE - LOG=$POLICY_HOME/logs/db_backup_$DATE.log - ERR=$POLICY_HOME/logs/db_backup_$DATE.err create_backup_dir backup_database |