diff --git a/bin/manager/storage/minio_stor.py b/bin/manager/storage/minio_stor.py index 629fc74..fafceba 100644 --- a/bin/manager/storage/minio_stor.py +++ b/bin/manager/storage/minio_stor.py @@ -28,10 +28,6 @@ def __init__(self, envs=os.environ): access_key=self.access_key, secret_key=self.secret_key, secure=is_tls) - try: - self.client.make_bucket(self.bucket, location=self.location) - except minioerror.BucketAlreadyOwnedByYou: - pass @debug def get_backup(self, backup_id): @@ -49,5 +45,9 @@ def put_backup(self, backup_id, infile): """ Upload the backup file to the expected path. """ + try: + self.client.make_bucket(self.bucket, location=self.location) + except minioerror.BucketAlreadyOwnedByYou: + pass self.client.fput_object(self.bucket, backup_id, infile) return backup_id