Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
1d270ca6
Commit
1d270ca6
authored
Dec 06, 2017
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1d76b059
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
31 deletions
+25
-31
db_replace_ip.sh
db-utils/db_replace_ip.sh
+24
-30
db_schema_sync.sh
db-utils/db_schema_sync.sh
+1
-1
No files found.
db-utils/db_replace_ip.sh
View file @
1d270ca6
...
...
@@ -17,12 +17,9 @@ config_server="$pwd_path/config_server"
project_path
=
`
cat
$config_server
/project_path.sh
`
config_path
=
`
cat
$config_server
/config_path.sh
`
echo
$server_host
cd
$db_sub_backup_folder
file_count
=
`
ls
-l
|grep
"^-"
|wc
-l
`
hosts
=
`
node
$config_server
/get_project_config.js
-type
multi
-attr
port/url
-attr2
true
`
function
transByPort
()
...
...
@@ -75,9 +72,7 @@ if [ $database_name = 'mall' ];then
fi
done
else
echo
"./* file count is
$file_count
"
if
[
"
$file_count
"
-gt
0
]
;
then
sed
-i
"s/https
\:
/http
\:
/g"
*
sed
-i
"s/https
\:
/http
\:
/g"
$db_sub_backup_folder
/
*
if
[
"
$re_replace_ip
"
=
true
]
;
then
echo
"replace public ip for
$db_sub_backup_folder
/*"
for
host
in
$hosts
...
...
@@ -102,7 +97,6 @@ else
# transByPara $arr $entry $re_replace_ip
#done
fi
fi
fi
# sed -i "s/\/m.xyqb.com/\/xyqb-ui-$ip_last.q-gp.com/g" $entry
...
...
db-utils/db_schema_sync.sh
View file @
1d270ca6
...
...
@@ -93,7 +93,7 @@ function db_schema_sync()
cd
$db_backup_sub_folders
file_count
=
`
ls
-l
|
grep
.sql
$
|
wc
-l
`
echo
"
.
/*.sql file count is
$file_count
"
echo
"
$db_backup_sub_folders
/*.sql file count is
$file_count
"
if
[
"
$file_count
"
-gt
0
]
;
then
echo
"--- Step 2: replace domain name in tables:
$database
$db_backup_sub_folders
---"
echo
"--- Step 2: is re_replace_ip:
$re_replace_ip
---"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment