Uplad backup files to Glacier Instant Retrieval class
'StorageClass': 'GLACIER_IR', # Glacier Instant Retrieval
This commit is contained in:
parent
a34b9bc7df
commit
3d8400a5af
@ -204,8 +204,15 @@ def upload_to_s3(aws_s3_configuration, file_paths):
|
|||||||
s3_object_key = remove_before_first_dash(s3_object_key)
|
s3_object_key = remove_before_first_dash(s3_object_key)
|
||||||
try:
|
try:
|
||||||
logging.info(f"Uploading {s3_object_key} to s3://{aws_s3_configuration["S3_BUCKET_NAME"]}/{s3_object_key}")
|
logging.info(f"Uploading {s3_object_key} to s3://{aws_s3_configuration["S3_BUCKET_NAME"]}/{s3_object_key}")
|
||||||
s3_client.upload_file(file_path, aws_s3_configuration["S3_BUCKET_NAME"], s3_object_key)
|
s3_client.upload_file(
|
||||||
logging.info(f"Successfully uploaded {s3_object_key} to S3.")
|
file_path,
|
||||||
|
aws_s3_configuration["S3_BUCKET_NAME"],
|
||||||
|
s3_object_key,
|
||||||
|
ExtraArgs={
|
||||||
|
'StorageClass': 'GLACIER_IR', # Glacier Instant Retrieval
|
||||||
|
'ServerSideEncryption': 'AES256'
|
||||||
|
})
|
||||||
|
logging.info(f"Uploaded to {aws_s3_configuration["S3_BUCKET_NAME"]}/{s3_object_key} with Glacier Instant Retrieval")
|
||||||
email_body_parts.append(f"Successfully uploaded {s3_object_key} to S3.")
|
email_body_parts.append(f"Successfully uploaded {s3_object_key} to S3.")
|
||||||
|
|
||||||
except ClientError as ce:
|
except ClientError as ce:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user