mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-09-13 20:20:11 +02:00
Compare commits
8 Commits
298c9aee23
...
main
Author | SHA1 | Date | |
---|---|---|---|
122ef64ad7 | |||
99f673996e | |||
68e23da03b | |||
1c30fb9995 | |||
b94b61ba5d | |||
26c3245cf3 | |||
1510dc2e8d | |||
d949188a34 |
@@ -12,3 +12,4 @@ var_lib_motioneye/*
|
||||
nextcloud/mariadb/*
|
||||
zabbix-server/postgres-data/*
|
||||
gitea-runner/*
|
||||
immich/library/*
|
@@ -31,7 +31,7 @@ def signal_handler(sig, frame):
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
file_path = os.path.realpath(__file__)
|
||||
dir_path = os.path.dirname(file_path)
|
||||
VERSION="1.0.9"
|
||||
VERSION="1.0.10"
|
||||
# print(file_path)
|
||||
# print(dir_path)
|
||||
os.chdir(dir_path)
|
||||
@@ -110,7 +110,6 @@ for o, a in opts:
|
||||
elif o in ("-r", "--restore"):
|
||||
_RESTORE = True
|
||||
_APP = a
|
||||
print("RESTORE")
|
||||
elif o in ("-D", "--dry"):
|
||||
_EXECUTE = False
|
||||
elif o in ("-T", "--dry"):
|
||||
@@ -241,9 +240,12 @@ if _STOP:
|
||||
cmnd = f"docker stop {c.split()[-1]}"
|
||||
status, running_containers = subprocess.getstatusoutput(cmnd)
|
||||
def restore_job(_APP):
|
||||
#global VERSION
|
||||
logging.info("Starting Restore")
|
||||
print(f"Starting restore : {VERSION}")
|
||||
now = datetime.datetime.now()
|
||||
STARTTIME = now.strftime("%Y-%m-%d_%H:%M:%S")
|
||||
_DATE = "pick"
|
||||
if _APP == "all":
|
||||
_DATE = "latest"
|
||||
if host == "rpi5.home.lan" or host == "rpi5":
|
||||
@@ -256,6 +258,7 @@ def restore_job(_APP):
|
||||
#input("????")
|
||||
else:
|
||||
_APP = _APP.split(",")
|
||||
|
||||
PROGRESS = 0
|
||||
topic = "sectorq/amd/restore"
|
||||
step = 100 / len(_APP)
|
||||
@@ -277,7 +280,7 @@ def restore_job(_APP):
|
||||
if _DATE == "pick":
|
||||
cmnd = f"ssh root@amd.home.lan 'ls {BACKUP_DEVICE}/backup/m-server/docker_data'"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(output)
|
||||
# print(output)
|
||||
dates = output.splitlines()
|
||||
n = 1
|
||||
for i in dates:
|
||||
|
Reference in New Issue
Block a user