Skeleton for backends
This commit is contained in:
parent
11fdffb719
commit
47d74a2ef7
5 changed files with 46 additions and 0 deletions
37
src/restic_compose_backup/backup/base.py
Normal file
37
src/restic_compose_backup/backup/base.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
|
||||
class BackupBase:
|
||||
"""
|
||||
Base class for specific backup types such as various databases.
|
||||
|
||||
A backup type is responsible for processing all actions defined
|
||||
on a service. This includes pre-run and post-run actions.
|
||||
|
||||
All backup objects are instantiated before all the backup
|
||||
execution begins to sanity check the configuration and
|
||||
report the current parsed configuration to the user.
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Possibly pass in the service object here?
|
||||
# Grab labels from service.
|
||||
pass
|
||||
|
||||
def pre_run(self):
|
||||
"""
|
||||
Pre-run raw command.
|
||||
Pre-run execution in a container.
|
||||
"""
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Run the backup
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def post_run(self):
|
||||
"""
|
||||
Post-run raw command.
|
||||
Post-run execution in a container.
|
||||
"""
|
||||
pass
|
0
src/restic_compose_backup/backup/influxdb.py
Normal file
0
src/restic_compose_backup/backup/influxdb.py
Normal file
0
src/restic_compose_backup/backup/mariadb.py
Normal file
0
src/restic_compose_backup/backup/mariadb.py
Normal file
0
src/restic_compose_backup/backup/mysql.py
Normal file
0
src/restic_compose_backup/backup/mysql.py
Normal file
9
src/restic_compose_backup/backup/volumes.py
Normal file
9
src/restic_compose_backup/backup/volumes.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
# Zepla
|
||||
# listens
|
||||
# to
|
||||
# Asmongolds
|
||||
# advice
|
||||
# on
|
||||
# Online
|
||||
# Harassment
|
Loading…
Add table
Reference in a new issue