barman.cloud_providers package#
Submodules#
Module contents#
- exception barman.cloud_providers.CloudProviderOptionUnsupportedView on GitHub#
Bases:
BarmanExceptionException raised when a supported cloud provider is given an unsupported option
- exception barman.cloud_providers.CloudProviderUnsupportedView on GitHub#
Bases:
BarmanExceptionException raised when an unsupported cloud provider is requested
- exception barman.cloud_providers.ObjectKeyAlreadyExistsView on GitHub#
Bases:
BarmanExceptionException raised when trying to insert an object with a key that already exists
- barman.cloud_providers._get_azure_credential(credential_type)View on GitHub#
- barman.cloud_providers._make_azure_cloud_interface(config, cloud_interface_kwargs)View on GitHub#
- barman.cloud_providers._make_google_cloud_interface(config, cloud_interface_kwargs)View on GitHub#
- Parameters:
config – Not used yet
cloud_interface_kwargs – common parameters
- Returns:
GoogleCloudInterface
- barman.cloud_providers._make_s3_cloud_interface(config, cloud_interface_kwargs)View on GitHub#
- barman.cloud_providers._update_kwargs(kwargs, config, args)View on GitHub#
Helper which adds the attributes of config specified in args to the supplied kwargs dict if they exist.
- barman.cloud_providers.get_cloud_interface(config)View on GitHub#
Factory function that creates CloudInterface for the specified cloud_provider
- Param:
argparse.Namespace config
- Returns:
A CloudInterface for the specified cloud_provider
- Return type:
- barman.cloud_providers.get_cloud_interface_from_server_config(config, cloud_provider, base_url)View on GitHub#
Factory function that creates a CloudInterface for the specified cloud_provider based on the base_url.
- Parameters:
config (barman.config.Config) – The barman configuration object for a specific server.
cloud_provider (str) – The cloud provider to create the interface for.
base_url (str) – The base URL to use for the cloud interface.
- Return type:
- Returns:
A CloudInterface for the specified cloud_provider.
- barman.cloud_providers.get_snapshot_interface(config)View on GitHub#
Factory function that creates CloudSnapshotInterface for the cloud provider specified in the supplied config.
- Parameters:
config (argparse.Namespace) – The backup options provided at the command line.
- Return type:
- Returns:
A CloudSnapshotInterface for the specified snapshot_provider.
- barman.cloud_providers.get_snapshot_interface_from_backup_info(backup_info, config=None)View on GitHub#
Factory function that creates CloudSnapshotInterface for the snapshot provider specified in the supplied backup info.
- Parameters:
backup_info (barman.infofile.BackupInfo) – The metadata for a specific backup. cloud provider.
config (argparse.Namespace|barman.config.Config) – The backup options provided by the command line or the Barman configuration.
- Return type:
- Returns:
A CloudSnapshotInterface for the specified snapshot provider.
- barman.cloud_providers.get_snapshot_interface_from_server_config(server_config)View on GitHub#
Factory function that creates CloudSnapshotInterface for the snapshot provider specified in the supplied config.
- Parameters:
server_config (barman.config.Config) – The barman configuration object for a specific server.
- Return type:
- Returns:
A CloudSnapshotInterface for the specified snapshot_provider.
- barman.cloud_providers.recognize_cloud_provider(url)View on GitHub#
Check if the given URL is a valid cloud storage URL and return the corresponding storage provider.
- Parameters:
url (str) – The URL to validate
- Return type:
string|None
- Returns:
The storage provider, or None if the URL is invalid
Note
The strings follow the same naming used by
barman-cloud-backup.
- barman.cloud_providers.snapshots_info_from_dict(snapshots_info)View on GitHub#
Factory function which creates a SnapshotInfo object for the supplied dict of snapshot backup metadata.
- Parameters:
snapshots_info (dict) – Dictionary of snapshots info from a backup.info
- Return type:
- Returns:
A SnapshotInfo subclass for the snapshots provider listed in the provider field of the snapshots_info.
- barman.cloud_providers.validate_azure_blob_storage_url(url)View on GitHub#
Validate an Azure Blob Storage URL.
- barman.cloud_providers.validate_google_cloud_url(url)View on GitHub#
Validate a Google Cloud Storage URL.
- barman.cloud_providers.validate_s3_url(url)View on GitHub#
Validate an S3 or S3-compatible URL.