2019-01-06 17:34:02 +01:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
class Backup:
|
2019-01-06 21:29:21 +01:00
|
|
|
def __init__(self, name, cfg=None):
|
2019-02-24 22:42:36 +01:00
|
|
|
self.name = name
|
|
|
|
self.config = cfg
|
2019-01-06 17:34:02 +01:00
|
|
|
|
2020-01-05 13:17:46 +01:00
|
|
|
@classmethod
|
|
|
|
def instance(cls, name, config=None):
|
|
|
|
return Backup(name, config)
|
|
|
|
|
2019-05-03 21:36:44 +02:00
|
|
|
def get_frequency(self):
|
|
|
|
return self.config.get("frequency", None)
|
|
|
|
|
2019-01-06 17:34:02 +01:00
|
|
|
def run(self):
|
|
|
|
|
2019-05-03 21:36:44 +02:00
|
|
|
if self.config.get("scripts", None):
|
|
|
|
pass
|
|
|
|
|