summaryrefslogtreecommitdiff
path: root/backup.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-12-12 21:11:16 +0100
committerErich Eckner <git@eckner.net>2016-12-12 21:35:25 +0100
commit51bd7e7f6a628ebaeca1e386cc81106b2c3f9c2a (patch)
tree3bd81befef25576fe0aa4804e9a817bea122c8c7 /backup.in
parentb26ebdfa52651603c57ae12972b2331005ec6fe3 (diff)
downloadhardlinkedBackups-51bd7e7f6a628ebaeca1e386cc81106b2c3f9c2a.tar.xz
reorder link-dest's to prefer newer backups over older -> should prevent creating _many_ hard link groups (with few files each) due to too many hard links on old(est) link-dest file
Diffstat (limited to 'backup.in')
-rwxr-xr-xbackup.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/backup.in b/backup.in
index 2096963..3264370 100755
--- a/backup.in
+++ b/backup.in
@@ -79,7 +79,7 @@ fi
neues_Datum=${Basis}/$(date "+%Y_%m_%d")
neues=${Basis}/aktuell
linkdests=""
-for s in $(ls -1tr ${Basis} | grep -v aktuell | tail -n20 )
+for s in $(ls -1 ${Basis} | sort -r | grep -vm 20 aktuell )
do
linkdests="${linkdests} --link-dest ${Basis}/${s}"
done