diff options
author | Erich Eckner <git@eckner.net> | 2024-04-29 18:24:45 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2024-04-29 18:24:45 +0200 |
commit | 6274fc763a47ad0517ee19dfc728ef65114eef94 (patch) | |
tree | 7f7c7427bb4cec16de011d64cd8456f4f4df49dd | |
parent | 86c82d54457b2c0c348253873c5621f145d27339 (diff) | |
download | hardlinkedBackups-6274fc763a47ad0517ee19dfc728ef65114eef94.tar.xz |
remove-old-backups: only keep backups of the last 180 days
-rwxr-xr-x | remove-old-backups.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/remove-old-backups.in b/remove-old-backups.in index c931409..e1a795d 100755 --- a/remove-old-backups.in +++ b/remove-old-backups.in @@ -61,7 +61,7 @@ backups=$( uniq -f2 printf '%s\n' "${backups}" | \ sed "$( - for dist in $(seq 0 20 365); do + for dist in $(seq 0 20 180); do printf '/ %s \S\+$/p\n' \ "$(date '+%m %Y' -d@$(($(date +%s)-24*60*60*${dist})))" done | \ |