diff options
author | 2018-04-02 14:11:34 -0400 | |
---|---|---|
committer | 2018-04-03 14:24:50 +0000 | |
commit | 80cbbc8710292ae08437daa6e3390cc0190e3139 (patch) | |
tree | a23f07b06617c33c96ee41568b9422c252997549 /packages/base/src/files/install/mysql/bin/db_restore_data.sh | |
parent | def1c29d8a8c4372e006b1388a456bca92d57500 (diff) |
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) <jc2555@att.com>
Diffstat (limited to 'packages/base/src/files/install/mysql/bin/db_restore_data.sh')
-rw-r--r-- | packages/base/src/files/install/mysql/bin/db_restore_data.sh | 7 |
1 files changed, 7 insertions, 0 deletions
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} |