update at 2023/08/14

This commit is contained in:
2023-08-14 21:41:37 +08:00
parent a039a664f1
commit 44e8cbee2c
255 changed files with 20426 additions and 233 deletions

33
tools/misc/dumpdb.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
home="/home/simon"
project="goprojects"
user="root"
password="1000omc@kp!"
host="192.168.2.119"
port="33066"
dbname="omc_db"
dumpdbdir=${home}/${project}/ems.agt/tools/misc
insdir=${home}/${project}/ems.agt/database/install
upgdir=${home}/${project}/ems.agt/database/upgrade
tables_c=tables_c.lst
tables_s=tables_s.lst
#mysql -u ${user} -p${password} -D ${dbname} -e "show tables ; " > tables.lst
# dump table struct and data
while read line
do
table=`echo $line | cut -d " " -f 1`
echo "dump ${table} to install & upgrade directory"
mysqldump -h ${host} -P ${port} -u ${user} -p${password} ${dbname} ${table} > ${insdir}/${table}.sql
mysqldump -h ${host} -P ${port} -u ${user} -p${password} ${dbname} ${table} > ${upgdir}/${table}.sql
done < ${dumpdbdir}/${tables_c}
# dump table struct
while read line
do
table=`echo $line | cut -d " " -f 1`
echo "dump ${table} to install directory"
mysqldump -h ${host} -P ${port} -u ${user} -p${password} -d ${dbname} ${table} > ${insdir}/${table}.sql
done < ${dumpdbdir}/${tables_s}

10
tools/misc/rsyncsmb.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
# 源目录Windows目录
SRC_DIR="192.168.2.119:/goprojects"
# 目标目录Samba目录
DST_DIR="/home/simon/goprojects"
# 同步目录
#rsync -avz --delete "$SRC_DIR/" "$DST_DIR/"
rsync -avz --delete --user=myuser --password-file=/path/to/password.txt "$SRC_DIR/" "$DST_DIR/"

15
tools/misc/tables_c.lst Normal file
View File

@@ -0,0 +1,15 @@
alarm_define
cm_title
config
group
kpi_title
measure_title
menu
mml_command
mml_http_map
mml_subscriber
mml_system
param_config
title_info
trace_info
user_menu

39
tools/misc/tables_s.lst Normal file
View File

@@ -0,0 +1,39 @@
4a_log
alarm
alarm_forward_log
alarm_log
alarm_relation
alarm_subscribe
event_log
gold_kpi
measure_data
measure_task
measure_threshold
mml_log
nbi_alarm_log
nbi_operation_log
nbi_secure_log
ne_backup
ne_info
ne_license
ne_link
ne_software
ne_state
ne_version
northbound_cm
northbound_pm
operation_log
param_value
pm_custom_data
pm_custom_title
rs_subscribe
security_log
session
system_log
trace_data
trace_task
permission
role_permission
role
user
user_role