mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-09-13 12:10:12 +02:00
build
This commit is contained in:
@@ -593,9 +593,9 @@ def backup_job(server):
|
|||||||
status, output = subprocess.getstatusoutput(cmnd)
|
status, output = subprocess.getstatusoutput(cmnd)
|
||||||
for f in output.splitlines():
|
for f in output.splitlines():
|
||||||
pattern = r"^[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2}$" # regex pattern: string starts with 'abc'
|
pattern = r"^[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2}$" # regex pattern: string starts with 'abc'
|
||||||
logging.info(f"Checking {f}")
|
# logging.info(f"Checking {f}")
|
||||||
if re.match(pattern, f):
|
if re.match(pattern, f):
|
||||||
logging.info("Match!")
|
# logging.info("Match!")
|
||||||
dt = datetime.datetime.strptime(f, "%Y-%m-%d_%H-%M-%S")
|
dt = datetime.datetime.strptime(f, "%Y-%m-%d_%H-%M-%S")
|
||||||
epoch_time = int(dt.timestamp())
|
epoch_time = int(dt.timestamp())
|
||||||
|
|
||||||
@@ -640,6 +640,7 @@ def backup_job(server):
|
|||||||
|
|
||||||
send_mqtt_message(topic,msg)
|
send_mqtt_message(topic,msg)
|
||||||
topic = "sectorq/backups/start"
|
topic = "sectorq/backups/start"
|
||||||
|
logging.info(f"LALA : {topic}")
|
||||||
send_mqtt_message(topic, "finished",qos=2,retain=True)
|
send_mqtt_message(topic, "finished",qos=2,retain=True)
|
||||||
|
|
||||||
topic = "sectorq/amd/restore"
|
topic = "sectorq/amd/restore"
|
||||||
|
Reference in New Issue
Block a user