Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
customer-recall
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tools
customer-recall
Commits
80b23dd2
Commit
80b23dd2
authored
Aug 16, 2025
by
yiling.shen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Docker container backup logic in deployment script
parent
b8df6aab
Pipeline
#3188
failed with stages
in 11 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
deploy_scripts/deploy_with_backup.sh
+5
-1
No files found.
deploy_scripts/deploy_with_backup.sh
View file @
80b23dd2
...
@@ -90,7 +90,11 @@ else
...
@@ -90,7 +90,11 @@ else
# 使用Docker容器备份
# 使用Docker容器备份
if
docker ps |
grep
-q
mysql
;
then
if
docker ps |
grep
-q
mysql
;
then
log_info
"使用Docker容器备份数据库..."
log_info
"使用Docker容器备份数据库..."
docker
exec
$(
docker ps
-q
--filter
"ancestor=mysql"
)
\
# 查找MySQL容器
MYSQL_CONTAINER
=
$(
docker ps
-q
--filter
"ancestor=mysql"
--filter
"ancestor=mariadb"
| head
-1
)
if
[
-n
"
$MYSQL_CONTAINER
"
]
;
then
log_info
"找到MySQL容器:
$MYSQL_CONTAINER
"
docker
exec
"
$MYSQL_CONTAINER
"
\
mysqldump
-u
"
$DB_USER
"
-p
"
$DB_PASSWORD
"
\
mysqldump
-u
"
$DB_USER
"
-p
"
$DB_PASSWORD
"
\
--single-transaction
\
--single-transaction
\
--routines
\
--routines
\
...
...
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