Provides services for creating the backup.
ArchiverServiceProviders enum and ArchiverServiceCreator class.
Bases: builtins.object
Creator of archiver service instances.
Removes all existing archiver service instances.
Existing instances of all services will be forgotten. Subsequent request to getOrCreateArchiverService() will result in creation of a new instance.
Gets existing or creates the new archiver service instance.
See also: destroyServices().
Parameters: |
|
---|---|
Returns: | Instance of an archiver service. |
Return type: | |
Raises RuntimeError: | |
If creation of the service provider failed. |
Returns a set of backup types supported by the given archiver service provider.
Parameters: | archiverServiceProvider (ArchiverServiceProviders) – Service provider for which the backup types shall be returned. |
---|---|
Returns: | Set of supported backup types. |
Return type: | set<BackupTypes> |
Returns a set of features supported by the given archiver service provider.
Parameters: |
|
---|---|
Returns: | Set of supported features. |
Return type: | set<ArchiverFeatures> |
Raises ValueError: | |
If the given backupType is not supported by the archiverServiceProvider |
Implementations of the archiver service.
_TarArchiverProviderBase class.
Bases: AutoArchive._archiving.iarchiver.IArchiver
Base class for tar archiver service providers.
Abstract constructor of this class, should be called from derived constructors. It initializes the workDir_ property.
Parameters: | workDir (str) – Path to a writable directory. The service will use it as persistent storage. |
---|
Performs basic checks before the backup creation.
Note
Derived classes should call this base method on the beginning of the overridden method.
See also: IArchiver.backupFiles().
Performs basic checks before the incremental backup creation.
Note
Derived classes should call this base method on the beginning of the overridden method.
See also: IArchiver.backupFilesIncrementally().
Assembles the backup file name and returns a path to it.
Parameters: |
|
---|---|
Returns: | Path to the backup file. |
Return type: | str |
Raises an exception if the passed backupType is not supported by the implementation.
See also: IArchiver.supportedBackupTypes.
Parameters: | backupType (BackupTypes) – The backup type that shall be checked. |
---|---|
Raises ValueError: | |
If the passed backupType is not supported by the concrete implementation. |
See: IArchiver.removeBackup().
_ExternalTarArchiverProvider class.
Bases: AutoArchive._services.archiver._tar_archiver_provider_base._TarArchiverProviderBase
External archiver service provider.
See also: _TarArchiverProviderBase.
Raises OSError: | If creation of the snapshot directory failed. |
---|
_InternalTarArchiverProvider class.
Bases: AutoArchive._services.archiver._tar_archiver_provider_base._TarArchiverProviderBase
Internal archiver service provider.
See also: _TarArchiverProviderBase.