|
|
|
@ -27,13 +27,13 @@ def remote_call(arguments):
@@ -27,13 +27,13 @@ def remote_call(arguments):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def clean_split(text): |
|
|
|
|
items = (item.strip() for item in text.split) |
|
|
|
|
items = (item.strip() for item in text.split()) |
|
|
|
|
return [item for item in items if item] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def list_snapshots(): |
|
|
|
|
cmd = ["zfs", "list", "-t", "snapshot", "-H", "-o", "name", "-r", ZFS_POOL] |
|
|
|
|
return clean_split(call(cmd)) |
|
|
|
|
return clean_split(call(cmd, as_text=True)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def elab_snapshots(): |
|
|
|
@ -124,4 +124,5 @@ def create_backups():
@@ -124,4 +124,5 @@ def create_backups():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
|
create_backups() |
|
|
|
|
es = elab_snapshots() |
|
|
|
|
print(list_remote_backups(es.keys()) |
|
|
|
|