feat: dump復元スクリプトのS3 URIチェック処理を消した。
This commit is contained in:
parent
6196379478
commit
7327c3d8e7
@ -1,7 +1,6 @@
|
||||
"""実消化&アルトマークダンプ復元スクリプト"""
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import textwrap
|
||||
|
||||
@ -32,12 +31,6 @@ def exec():
|
||||
# 復元対象のダンプファイルを特定
|
||||
s3_file_path = environment.JSKULT_BACKUP_DUMP_S3_FILE_PATH
|
||||
|
||||
# S3 URIになっているか確認
|
||||
s3_file_path_pattern = r"s3://(.+)/dump/(\d{4})/(\d{2})/(\d{2})/backup_rds_src05_(\d+).gz"
|
||||
if re.match(s3_file_path_pattern, s3_file_path) is None:
|
||||
logger.warning('環境変数[JSKULT_BACKUP_DUMP_S3_FILE_PATH]に指定された、S3 URIの形式が不正です。')
|
||||
return constants.BATCH_EXIT_CODE_SUCCESS
|
||||
|
||||
# aws s3 cpコマンドを実行してdumpファイルをローカルにダウンロードする
|
||||
s3_cp_process = subprocess.Popen(['aws', 's3', 'cp', s3_file_path, './dump.gz'], stderr=subprocess.PIPE)
|
||||
_, error = s3_cp_process.communicate()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user