diff --git a/src/restic_compose_backup/backup/base.py b/src/restic_compose_backup/backup/base.py new file mode 100644 index 0000000..b16c41d --- /dev/null +++ b/src/restic_compose_backup/backup/base.py @@ -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 diff --git a/src/restic_compose_backup/backup/influxdb.py b/src/restic_compose_backup/backup/influxdb.py new file mode 100644 index 0000000..e69de29 diff --git a/src/restic_compose_backup/backup/mariadb.py b/src/restic_compose_backup/backup/mariadb.py new file mode 100644 index 0000000..e69de29 diff --git a/src/restic_compose_backup/backup/mysql.py b/src/restic_compose_backup/backup/mysql.py new file mode 100644 index 0000000..e69de29 diff --git a/src/restic_compose_backup/backup/volumes.py b/src/restic_compose_backup/backup/volumes.py new file mode 100644 index 0000000..f9f828b --- /dev/null +++ b/src/restic_compose_backup/backup/volumes.py @@ -0,0 +1,9 @@ + +# Zepla +# listens +# to +# Asmongolds +# advice +# on +# Online +# Harassment