28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
#### BaseBackupEngine
|
|
```python
|
|
class BaseBackupEngine(ABC)
|
|
"""
|
|
Abstract Base Class for backup engine class
|
|
"""
|
|
@abstractmethod
|
|
def run(self, tasks: list[BackupTasks], dry_run) -> bool:
|
|
"""
|
|
This method handles the backup process for the engine. Any tasks related to
|
|
that backup task should be handled in this method
|
|
|
|
args:
|
|
- tasks (list[BackupTask]): list of BackgroundTask objects to be
|
|
processed.
|
|
- dry_run (bool, optional): Dry run flag. If this flag is set, this
|
|
function will return None. A list of all files to be compressed, their
|
|
total size, and the path to the output file will be printed to the
|
|
console, and logged. Defaults to False.
|
|
"""
|
|
```
|
|
|
|
#### run
|
|
This method handles the backup process for the engine. Any tasks related to that backup task should be handled in this method
|
|
|
|
args:
|
|
- tasks (list\[BackupTask\]): list of BackupTask objects to be processed.
|
|
- dry_run (bool, optional): Dry run flag. If this flag is set, this function will return None. A list of all files to be compressed, their total size, and the path to the output file will be printed to the console, and logged. Defaults to False. |