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_remote.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_remote.sh')
-rw-r--r-- | packages/base/src/files/install/mysql/bin/db_backup_remote.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/base/src/files/install/mysql/bin/db_backup_remote.sh b/packages/base/src/files/install/mysql/bin/db_backup_remote.sh index 212896942..72f31c33a 100644 --- a/packages/base/src/files/install/mysql/bin/db_backup_remote.sh +++ b/packages/base/src/files/install/mysql/bin/db_backup_remote.sh @@ -70,14 +70,19 @@ if [ $# -eq 4 ]; then DB_PASSWORD="${2}" DATABASE="${3}" DB_HOSTNAME="${4}" + if [ -z ${POLICY_LOGS} ]; then + POLICY_LOGS=/var/log/onap + fi + mkdir -p $POLICY_LOGS/policy/db + LOG=$POLICY_LOGS/policy/db/db_backup_remote_$DATE.log + ERR=$POLICY_LOGS/policy/db/db_backup_remote_$DATE.err + echo "db_backup_remote.sh for [$DATABASE]@[${DB_HOSTNAME}] started ... `date`" | tee -a $LOG echo "DB_USER : $DB_USER" | tee -a $LOG echo "DATABASE : $DATABASE" | tee -a $LOG echo "DB_HOSTNAME: $DB_HOSTNAME" | tee -a $LOG DAILY_BACKUP_DIR=$POLICY_HOME/data/mysql/$DATE - LOG=$POLICY_HOME/logs/db_backup_remote_$DATE.log - ERR=$POLICY_HOME/logs/db_backup_remote_$DATE.err create_backup_dir backup_database |