Browse Source

bugfixes

master
root 5 years ago
parent
commit
9c99dec881
  1. 7
      zfs-snapshot-backup.py

7
zfs-snapshot-backup.py

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

Loading…
Cancel
Save