diff options
author | 2018-03-22 11:22:35 -0400 | |
---|---|---|
committer | 2018-03-23 18:05:27 -0400 | |
commit | 669931e76de18aabb14f9ff873da4783f8c83d7a (patch) | |
tree | d289226c55b0e7adfe9f56ea6dc6f9e32120dbca /packages/base/src/files/install/mysql/bin/db_restore_data.sh | |
parent | cc7d8f696dd7717493dfc87e41884c7dd9923b83 (diff) |
ONAP code change for log files consolidation
Code change for log files consolidation of PAP, PDP, BRMSGW, Console and db
script
Issue-ID: POLICY-562
Change-Id: I416ba7748b841bb2b1a31682e2b1631e279549e8
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} |