summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-06-02 16:45:45 -0400
committerAndrew Cady <d@jerkface.net>2023-06-05 17:08:35 -0400
commit5fe5561bfbcb7de20f5140d1b8a96a2d6bf66531 (patch)
tree22f211b22aa91cbb854e0330dbd41d476f753097
parentbba6b0a3f486550f666f7a3963c509402198b655 (diff)
modify retention policy to 15 days daily snapshots
-rwxr-xr-xsrc/retain-snapshots4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/retain-snapshots b/src/retain-snapshots
index 9b7fee3..5264970 100755
--- a/src/retain-snapshots
+++ b/src/retain-snapshots
@@ -50,7 +50,7 @@ btrfs_subvolume_delete()
50# If not specified it is 7 years. 50# If not specified it is 7 years.
51# Retain the most recent snapshot within any year of the last 7 years. 51# Retain the most recent snapshot within any year of the last 7 years.
52# Retain the most recent snapshot within any month of the last 365 days. 52# Retain the most recent snapshot within any month of the last 365 days.
53# Retain the most recent snapshot within any day of the last 7 days. 53# Retain the most recent snapshot within any day of the last 15 days.
54# Retain the most recent snapshot within any hour of the last 24 hours. 54# Retain the most recent snapshot within any hour of the last 24 hours.
55# Retain the most recent snapshot within any minute of the last hour. 55# Retain the most recent snapshot within any minute of the last hour.
56# Retain any snapshot created in the last minute. 56# Retain any snapshot created in the last minute.
@@ -87,7 +87,7 @@ retain()
87 elif [ "$month" != "$_month" ] && [ "$age" -lt $((366 * 24 * 60 * 60)) ] 87 elif [ "$month" != "$_month" ] && [ "$age" -lt $((366 * 24 * 60 * 60)) ]
88 then 88 then
89 keep="$year-$month -> $line" 89 keep="$year-$month -> $line"
90 elif [ "$day" != "$_day" ] && [ "$age" -lt $((7 * 24 * 60 * 60)) ] 90 elif [ "$day" != "$_day" ] && [ "$age" -lt $((15 * 24 * 60 * 60)) ]
91 then 91 then
92 keep="$year-$month-$day -> $line" 92 keep="$year-$month-$day -> $line"
93 elif [ "$hour" != "$_hour" ] && [ "$age" -lt $((24 * 60 * 60)) ] 93 elif [ "$hour" != "$_hour" ] && [ "$age" -lt $((24 * 60 * 60)) ]