Compare commits

...

8 Commits

Author SHA1 Message Date
122ef64ad7 build 2025-09-09 11:20:50 +02:00
99f673996e build 2025-09-03 00:44:11 +02:00
68e23da03b build 2025-09-03 00:42:59 +02:00
1c30fb9995 build 2025-09-03 00:42:34 +02:00
b94b61ba5d build 2025-09-03 00:42:04 +02:00
26c3245cf3 build 2025-09-03 00:41:26 +02:00
1510dc2e8d build 2025-09-03 00:40:13 +02:00
d949188a34 build 2025-09-03 00:39:24 +02:00
2 changed files with 8 additions and 4 deletions

View File

@@ -12,3 +12,4 @@ var_lib_motioneye/*
nextcloud/mariadb/* nextcloud/mariadb/*
zabbix-server/postgres-data/* zabbix-server/postgres-data/*
gitea-runner/* gitea-runner/*
immich/library/*

View File

@@ -31,7 +31,7 @@ def signal_handler(sig, frame):
signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGINT, signal_handler)
file_path = os.path.realpath(__file__) file_path = os.path.realpath(__file__)
dir_path = os.path.dirname(file_path) dir_path = os.path.dirname(file_path)
VERSION="1.0.9" VERSION="1.0.10"
# print(file_path) # print(file_path)
# print(dir_path) # print(dir_path)
os.chdir(dir_path) os.chdir(dir_path)
@@ -110,7 +110,6 @@ for o, a in opts:
elif o in ("-r", "--restore"): elif o in ("-r", "--restore"):
_RESTORE = True _RESTORE = True
_APP = a _APP = a
print("RESTORE")
elif o in ("-D", "--dry"): elif o in ("-D", "--dry"):
_EXECUTE = False _EXECUTE = False
elif o in ("-T", "--dry"): elif o in ("-T", "--dry"):
@@ -241,9 +240,12 @@ if _STOP:
cmnd = f"docker stop {c.split()[-1]}" cmnd = f"docker stop {c.split()[-1]}"
status, running_containers = subprocess.getstatusoutput(cmnd) status, running_containers = subprocess.getstatusoutput(cmnd)
def restore_job(_APP): def restore_job(_APP):
#global VERSION
logging.info("Starting Restore") logging.info("Starting Restore")
print(f"Starting restore : {VERSION}")
now = datetime.datetime.now() now = datetime.datetime.now()
STARTTIME = now.strftime("%Y-%m-%d_%H:%M:%S") STARTTIME = now.strftime("%Y-%m-%d_%H:%M:%S")
_DATE = "pick"
if _APP == "all": if _APP == "all":
_DATE = "latest" _DATE = "latest"
if host == "rpi5.home.lan" or host == "rpi5": if host == "rpi5.home.lan" or host == "rpi5":
@@ -256,6 +258,7 @@ def restore_job(_APP):
#input("????") #input("????")
else: else:
_APP = _APP.split(",") _APP = _APP.split(",")
PROGRESS = 0 PROGRESS = 0
topic = "sectorq/amd/restore" topic = "sectorq/amd/restore"
step = 100 / len(_APP) step = 100 / len(_APP)
@@ -277,7 +280,7 @@ def restore_job(_APP):
if _DATE == "pick": if _DATE == "pick":
cmnd = f"ssh root@amd.home.lan 'ls {BACKUP_DEVICE}/backup/m-server/docker_data'" cmnd = f"ssh root@amd.home.lan 'ls {BACKUP_DEVICE}/backup/m-server/docker_data'"
status, output = subprocess.getstatusoutput(cmnd) status, output = subprocess.getstatusoutput(cmnd)
print(output) # print(output)
dates = output.splitlines() dates = output.splitlines()
n = 1 n = 1
for i in dates: for i in dates: