From 7327c3d8e7882db3276f178d60d00dd15ff2eafd Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Fri, 4 Aug 2023 13:49:17 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20dump=E5=BE=A9=E5=85=83=E3=82=B9?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88=E3=81=AES3=20URI=E3=83=81?= =?UTF-8?q?=E3=82=A7=E3=83=83=E3=82=AF=E5=87=A6=E7=90=86=E3=82=92=E6=B6=88?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/jskult-restore-backup/src/restore_backup.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ecs/jskult-restore-backup/src/restore_backup.py b/ecs/jskult-restore-backup/src/restore_backup.py index 439fe4cf..b72d3625 100644 --- a/ecs/jskult-restore-backup/src/restore_backup.py +++ b/ecs/jskult-restore-backup/src/restore_backup.py @@ -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()