mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-07-02 08:08:32 +02:00
lala
This commit is contained in:
@ -311,6 +311,12 @@ if _RESTORE:
|
|||||||
cmnd = f"rsync -avz --delete {BACKUP_HOST}:{BACKUP_DEVICE}{NEW_BACKUP_DIR} {SOURCE_DIR}"
|
cmnd = f"rsync -avz --delete {BACKUP_HOST}:{BACKUP_DEVICE}{NEW_BACKUP_DIR} {SOURCE_DIR}"
|
||||||
ans = "y"
|
ans = "y"
|
||||||
print(cmnd)
|
print(cmnd)
|
||||||
|
|
||||||
|
if _TEST:
|
||||||
|
ans = input("continue?") or "n"
|
||||||
|
if ans == "y" and _EXECUTE:
|
||||||
|
status, output = subprocess.getstatusoutput(cmnd)
|
||||||
|
|
||||||
file = "/share/docker_data/homepage/config/widgets.yaml"
|
file = "/share/docker_data/homepage/config/widgets.yaml"
|
||||||
with open(file, 'r') as stream:
|
with open(file, 'r') as stream:
|
||||||
try:
|
try:
|
||||||
@ -325,17 +331,15 @@ if _RESTORE:
|
|||||||
|
|
||||||
# Save it again
|
# Save it again
|
||||||
print(f"writing to file {file}")
|
print(f"writing to file {file}")
|
||||||
with open("/tmp/lala", 'w') as stream:
|
with open(file, 'w') as stream:
|
||||||
try:
|
try:
|
||||||
yaml.dump(loaded, stream, default_flow_style=False)
|
yaml.dump(loaded, stream, default_flow_style=False)
|
||||||
except yaml.YAMLError as exc:
|
except yaml.YAMLError as exc:
|
||||||
print("failed")
|
print("failed")
|
||||||
print(exc)
|
print(exc)
|
||||||
|
|
||||||
if _TEST:
|
|
||||||
ans = input("continue?") or "n"
|
|
||||||
if ans == "y" and _EXECUTE:
|
|
||||||
status, output = subprocess.getstatusoutput(cmnd)
|
|
||||||
print("Start docker")
|
print("Start docker")
|
||||||
# cmnd = "docker start heimdall"
|
# cmnd = "docker start heimdall"
|
||||||
# status, output = subprocess.getstatusoutput(cmnd)
|
# status, output = subprocess.getstatusoutput(cmnd)
|
||||||
|
Reference in New Issue
Block a user