|
|
|
@ -49,11 +49,11 @@ def get_remote_checksum(local_backup_path):
@@ -49,11 +49,11 @@ def get_remote_checksum(local_backup_path):
|
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
def get_local_checksum(local_backup_path): |
|
|
|
|
result = call(["sha256", str(local_backup_path), as_text=True) |
|
|
|
|
result = call(["sha256", str(local_backup_path)], as_text=True) |
|
|
|
|
parts = result.split("=") |
|
|
|
|
return parts[1].strip() |
|
|
|
|
|
|
|
|
|
def batch_check() |
|
|
|
|
def batch_check(): |
|
|
|
|
for local_backup_path in get_local_backups(): |
|
|
|
|
remote_checksum = get_remote_checksum(local_backup_path) |
|
|
|
|
local_checksum = get_local_checksum(local_backup_path) |
|
|
|
@ -61,7 +61,7 @@ def batch_check()
@@ -61,7 +61,7 @@ def batch_check()
|
|
|
|
|
print("? {local_checksum} -> (error)") |
|
|
|
|
elif remote_checksum == local_checksum: |
|
|
|
|
print(" {local_checksum} -> {remote_checksum}") |
|
|
|
|
else |
|
|
|
|
else: |
|
|
|
|
print("XXX {local_checksum} -> {remote_checksum}") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|