Skip to content

Commit 2a65c66

Browse files
committed
fix: helm chart
1 parent b8e1686 commit 2a65c66

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docker/backup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,7 @@ def upload_s3(prefix):
213213
)
214214

215215
# 上传备份文件
216-
file_name = (
217-
f"{prefix}{date}.tar.gz.crypt" if backup_pwd else f"{prefix}{date}.tar.gz"
218-
)
216+
file_name = f"{prefix}{date}.sql.crypt" if backup_pwd else f"{prefix}{date}.sql"
219217
upload_path = f"{s3_prefix}/{file_name}" if s3_prefix else file_name
220218
client.upload_file(f"{backup_path}/{file_name}", s3_bucket, upload_path)
221219

@@ -227,7 +225,7 @@ def upload_s3(prefix):
227225

228226
file_prefix = f"{list_prefix}{prefix}"
229227
# 构造正则表达式
230-
regex_pattern = f"^{re.escape(file_prefix)}(\\d{{14}})\\.tar\\.gz(\\.crypt)?$"
228+
regex_pattern = f"^{re.escape(file_prefix)}(\\d{{14}})\\.sql(\\.crypt)?$"
231229
compiled_regex = re.compile(regex_pattern)
232230
keys = [
233231
object["Key"] for object in objects if compiled_regex.match(object["Key"])
@@ -252,7 +250,9 @@ def upload_s3(prefix):
252250
if not os.path.exists(backup_path):
253251
os.makedirs(backup_path)
254252

255-
final_prefix = calculate_file_prefix(mysql_dbs, mysql_tables,mysql_exclude_tables, file_prefix)
253+
final_prefix = calculate_file_prefix(
254+
mysql_dbs, mysql_tables, mysql_exclude_tables, file_prefix
255+
)
256256
print("final_prefix: ", final_prefix)
257257

258258
# 1. 按要求备份数据,并保存到指定路径

helm-chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.8
18+
version: 1.0.9
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "1.0.8"
24+
appVersion: "1.0.9"

0 commit comments

Comments
 (0)