Browse code

Change 'forever' to 'keep-all'

Lorenz Hüdepohl authored on23/04/2015 15:28:06
Showing1 changed files
... ...
@@ -13,17 +13,17 @@ parser = argparse.ArgumentParser(
13 13
 
14 14
   For every ZFS filesystem that has the user property 'autosnapshot:TAGNAME'
15 15
   a snapshot is created. The value must be a positive number or the string
16
-  "forever", which is used as the number of old snapshots to keep. If there
16
+  "keep-all", which is used as the number of old snapshots to keep. If there
17 17
   are more, the oldest are destroyed.
18 18
 
19 19
   Example:
20 20
 
21 21
    Setup properties:
22 22
 
23
-    #> zfs set autosnapshot:5min=12        dpool/fs
24
-    #> zfs set autosnapshot:hourly=24      dpool/fs
25
-    #> zfs set autosnapshot:daily=7        dpool/fs
26
-    #> zfs set autosnapshot:weekly=forever dpool/fs
23
+    #> zfs set autosnapshot:5min=12         dpool/fs
24
+    #> zfs set autosnapshot:hourly=24       dpool/fs
25
+    #> zfs set autosnapshot:daily=7         dpool/fs
26
+    #> zfs set autosnapshot:weekly=keep-all dpool/fs
27 27
 
28 28
    Use with this crontab:
29 29
 
... ...
@@ -57,7 +57,7 @@ for line in zfs_props.stdout:
57 57
         check_call(zfs + ["snapshot", new_snapshot])
58 58
 
59 59
         # Delete oldest snapshots
60
-        if number == "forever":
60
+        if number == "keep-all":
61 61
             continue
62 62
         else:
63 63
             number = int(number)