mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-11-23 16:02:29 +00:00
Skeleton for backends
This commit is contained in:
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
|
||||||
Reference in New Issue
Block a user