freezer.storage.s3 module¶
- class freezer.storage.s3.S3Storage(access_key, secret_key, endpoint, container, max_segment_size, skip_prepare=False)¶
 Bases:
freezer.storage.physical.PhysicalStorage- add_stream(stream, package_name, headers=None)¶
 
- backup_blocks(backup)¶
 - Parameters
 backup (freezer.storage.base.Backup) –
- Returns
 
- create_dirs(folder_list)¶
 
- get_bucket_name()¶
 
- get_file(from_path, to_path)¶
 
- get_object(bucket_name, key)¶
 
- get_object_prefix()¶
 
- get_s3_connection()¶
 - Return type
 s3client.Connection
- Returns
 
- get_storage_info()¶
 
- info()¶
 
- list_all_objects(bucket_name, prefix)¶
 
- listdir(path)¶
 - Parameters
 path (str) –
- Return type
 collections.Iterable[str]
- prepare()¶
 Check if the provided bucket is already available on S3 compatible storage. The verification is done by exact matching between the provided bucket name and the whole list of bucket available for the S3 account.
- put_file(from_path, to_path)¶
 - Parameters
 from_path (str) –
to_path (str) –
- put_object(bucket_name, key, data)¶
 
- rmtree(path)¶
 
- upload_stream(backup_basepath, stream)¶
 
- write_backup(rich_queue, backup)¶
 Upload object to the remote S3 compatible storage server :type rich_queue: freezer.streaming.RichQueue :type backup: freezer.storage.base.Backup