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
f21f3873
Commit
f21f3873
authored
Aug 16, 2025
by
yiling.shen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify deployment script to skip database backup if MySQL container not found
parent
cd3ac2cc
Pipeline
#3191
passed with stages
in 2 minutes 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
deploy_scripts/deploy_with_backup.sh
+10
-3
No files found.
deploy_scripts/deploy_with_backup.sh
View file @
f21f3873
...
@@ -115,15 +115,22 @@ else
...
@@ -115,15 +115,22 @@ else
fi
fi
else
else
log_error
"未找到MySQL容器,无法备份数据库!"
log_error
"未找到MySQL容器,无法备份数据库!"
exit
1
log_warning
"跳过数据库备份,继续部署流程..."
# 创建一个空的备份文件占位符
touch
"
$BACKUP_DIR
/
$BACKUP_FILE
"
log_info
"创建空的备份文件占位符:
$BACKUP_FILE
"
fi
fi
fi
fi
fi
fi
# 第三步:验证备份文件
# 第三步:验证备份文件
log_info
"🔍 验证备份文件..."
log_info
"🔍 验证备份文件..."
if
[
-f
"
$BACKUP_DIR
/
$BACKUP_FILE
"
]
&&
[
-s
"
$BACKUP_DIR
/
$BACKUP_FILE
"
]
;
then
if
[
-f
"
$BACKUP_DIR
/
$BACKUP_FILE
"
]
;
then
log_success
"备份文件验证成功!"
if
[
-s
"
$BACKUP_DIR
/
$BACKUP_FILE
"
]
;
then
log_success
"备份文件验证成功!"
else
log_warning
"备份文件为空(可能是占位符),继续部署..."
fi
else
else
log_error
"备份文件验证失败!"
log_error
"备份文件验证失败!"
exit
1
exit
1
...
...
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