From 80cbbc8710292ae08437daa6e3390cc0190e3139 Mon Sep 17 00:00:00 2001 From: "Chou, Joseph (JC2555)" Date: Mon, 2 Apr 2018 14:11:34 -0400 Subject: ONAP log files consolidation Check in changes for pap,pdp,console,brmsgw,paplp and pdplp Change-Id: I23525a44e0f269d04d9870c3eed18b6b8daacb2c Issue-ID: POLICY-562 Signed-off-by: Chou, Joseph (JC2555) --- packages/base/src/files/install/mysql/bin/db_restore_data.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/base/src/files/install/mysql/bin/db_restore_data.sh') diff --git a/packages/base/src/files/install/mysql/bin/db_restore_data.sh b/packages/base/src/files/install/mysql/bin/db_restore_data.sh index c4fec027f..ec0874a67 100644 --- a/packages/base/src/files/install/mysql/bin/db_restore_data.sh +++ b/packages/base/src/files/install/mysql/bin/db_restore_data.sh @@ -40,6 +40,8 @@ BACKUP_FILE="" DATABASE="" TABLE="" TEMP_FILE=/tmp/db_restore_data_$$.sql +DATE=`date +"%Y%m%d"` +LOG="" function restore_all { @@ -85,6 +87,11 @@ if [ $# -eq 5 ]; then typeset -l DATABASE="${4}" typeset -l TABLE="${5}" echo "DB_USER: $DB_USER" + if [ -z ${POLICY_LOGS} ]; then + POLICY_LOGS=/var/log/onap + fi + mkdir -p $POLICY_LOGS/policy/db + LOG=$POLICY_LOGS/policy/db/db_restore_data_$DATE.log if [ -f $BACKUP_FILE ]; then if [ "${TABLE}" != "all" ]; then restore_table ${DATABASE} ${TABLE} -- cgit 1.2.3-korg