Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ONAP code change for log files consolidation
[policy/engine.git]
/
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
c4fec02
..
ec0874a
100644
(file)
--- 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
DATABASE=""
TABLE=""
TEMP_FILE=/tmp/db_restore_data_$$.sql
+DATE=`date +"%Y%m%d"`
+LOG=""
function restore_all
{
function restore_all
{
@@
-85,6
+87,11
@@
if [ $# -eq 5 ]; then
typeset -l DATABASE="${4}"
typeset -l TABLE="${5}"
echo "DB_USER: $DB_USER"
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}
if [ -f $BACKUP_FILE ]; then
if [ "${TABLE}" != "all" ]; then
restore_table ${DATABASE} ${TABLE}