summaryrefslogtreecommitdiff
path: root/modules/zfssnap
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-19 15:59:59 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-19 15:59:59 +0100
commite3d9be7601e6eeff53d57c9a09d392577ba64ebb (patch)
tree3ff421712186d26819b77af7692a413ed445ed54 /modules/zfssnap
parent51183dff448079b64001479b13f1cb386e520e3a (diff)
downloadnixos-e3d9be7601e6eeff53d57c9a09d392577ba64ebb.tar
nixos-e3d9be7601e6eeff53d57c9a09d392577ba64ebb.tar.gz
nixos-e3d9be7601e6eeff53d57c9a09d392577ba64ebb.tar.bz2
nixos-e3d9be7601e6eeff53d57c9a09d392577ba64ebb.tar.xz
nixos-e3d9be7601e6eeff53d57c9a09d392577ba64ebb.zip
zfssnap: ...
Diffstat (limited to 'modules/zfssnap')
-rw-r--r--modules/zfssnap/zfssnap.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py
index 6daf11ff..1c3e1f9a 100644
--- a/modules/zfssnap/zfssnap.py
+++ b/modules/zfssnap/zfssnap.py
@@ -233,11 +233,12 @@ def autosnap():
233 do_snapshot(*single) 233 do_snapshot(*single)
234 if recursive: 234 if recursive:
235 do_snapshot(*recursive, recursive=True) 235 do_snapshot(*recursive, recursive=True)
236 if not single and not recursive:
237 logger.warning('No snapshots to create')
236 for snap in all_snap_names: 238 for snap in all_snap_names:
237 logger.info(f'Created ‘{snap}’') 239 logger.info(f'Created ‘{snap}’')
238 else: 240 if all_snap_names:
239 logger.warn('No snapshots to create') 241 rename(snapshots=all_snap_names)
240 rename(snapshots=all_snap_names)
241 242
242def main(): 243def main():
243 global logger 244 global logger