dal.backup package

Submodules

dal.backup.backup module

Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential

Developers: - Alexandre Pires (alexandre.pires@mov.ai) - 2020

class dal.backup.backup.BackupJob(manifest: list, shallow: bool = False, metadata: dict | None = None)

Bases: object

This class represents a backup job, this class is private and should not be accessed directly

clean()

Clean this backup job, for now we do nothing more then delete the backup directory

property job_id

return the curren job id

property manifest

return the manifest of this job

property metadata

return the metadata for this job

property path

return the path of this job

run()

starts the backup job

property state

return the state of this job

async write_archive(writer)

return this backup file, this method does not read everthing to memory, instead it reads the content of the file direct to a write

async write_log(writer)

writes this backup job log file, this method does not read everthing to memory, instead it reads the content of the file direct to a write

class dal.backup.backup.BackupManager

Bases: object

A static class to help on interacting with backups

static clean_jobs()

Do a clean-up of jobs that had already run successfully, this method should be called periodically

static create_job(manifest: list, shallow: bool = True, metadata: dict | None = None)

Creates a new backup job

static exists(job_id: str)

Checks is a job exists

static get_job_state(job_id: str)

Get the state of a job

static list_jobs()

Get a list of all existing backup jobs

logger = <Logger backup.mov.ai (INFO)>
static start_job(job_id: str)

Runs a backup job, we can only start jobs in our session

async static write_archive(job_id: str, writer)

writes this backup job archive, this method does not read everthing to memory, instead it reads the content of the file direct to a write

async static write_log(job_id: str, writer)

writes this backup job log file, this method does not read everthing to memory, instead it reads the content of the file direct to a write

dal.backup.restore module

Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential

Developers: - Alexandre Pires (alexandre.pires@mov.ai) - 2020

class dal.backup.restore.RestoreJob(restore_file: str)

Bases: object

This class represents a restore job, this class is private and should not be accessed directly

clean()

Clean this restore job, for now we do nothing more then delete the restore directory

property job_id

return the curren job id

property path

return the path of this job

run()

starts the restore job

property state

return the state of this job

async write_log(writer)

writes this restore job log file, this method does not read everthing to memory, instead it reads the content of the file direct to a write

class dal.backup.restore.RestoreManager

Bases: object

A static class to help on interacting with restores

static clean_jobs()

Do a clean-up of jobs that had already run successfully, this method should be called periodically

static create_job(restore_file: str)

Creates a new restore job

static exists(job_id: str)

Checks is a job exists

static get_job_state(job_id: str)

Get the state of a job

static list_jobs()

Get a list of all existing restore jobs

logger = <Logger restore.mov.ai (INFO)>
static start_job(job_id: str)

Runs a restore job, we can only start jobs in our session

async static write_log(job_id: str, writer)

writes this restore job log file, this method does not read everthing to memory, instead it reads the content of the file direct to a write

Module contents

Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential

Developers: - Alexandre Pires (alexandre.pires@mov.ai) - 2020

class dal.backup.BackupManager

Bases: object

A static class to help on interacting with backups

static clean_jobs()

Do a clean-up of jobs that had already run successfully, this method should be called periodically

static create_job(manifest: list, shallow: bool = True, metadata: dict | None = None)

Creates a new backup job

static exists(job_id: str)

Checks is a job exists

static get_job_state(job_id: str)

Get the state of a job

static list_jobs()

Get a list of all existing backup jobs

logger = <Logger backup.mov.ai (INFO)>
static start_job(job_id: str)

Runs a backup job, we can only start jobs in our session

async static write_archive(job_id: str, writer)

writes this backup job archive, this method does not read everthing to memory, instead it reads the content of the file direct to a write

async static write_log(job_id: str, writer)

writes this backup job log file, this method does not read everthing to memory, instead it reads the content of the file direct to a write

class dal.backup.RestoreManager

Bases: object

A static class to help on interacting with restores

static clean_jobs()

Do a clean-up of jobs that had already run successfully, this method should be called periodically

static create_job(restore_file: str)

Creates a new restore job

static exists(job_id: str)

Checks is a job exists

static get_job_state(job_id: str)

Get the state of a job

static list_jobs()

Get a list of all existing restore jobs

logger = <Logger restore.mov.ai (INFO)>
static start_job(job_id: str)

Runs a restore job, we can only start jobs in our session

async static write_log(job_id: str, writer)

writes this restore job log file, this method does not read everthing to memory, instead it reads the content of the file direct to a write