From 6680c95e64096b6eb07d732df14638605cb2c61f Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 7 Dec 2022 08:56:35 +0100 Subject: [PATCH] find latest link-dest --- gaboshlib/g_backup.bashfunc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gaboshlib/g_backup.bashfunc b/gaboshlib/g_backup.bashfunc index 5346b9e..87ea3bc 100644 --- a/gaboshlib/g_backup.bashfunc +++ b/gaboshlib/g_backup.bashfunc @@ -115,7 +115,7 @@ Nextcloud/ BACKUPSRVPATH_WITH_DATE="$BACKUPSRVPATH_WITH_HOST/backup-$(date +%Y-%m-%d)/$BACKUPDIR" BACKUPSRVPATH_WITH_DATE_INCOMPLETE="$BACKUPSRVPATH_WITH_DATE-incomplete" g_runcmd $sshopts mkdir -p "$BACKUPSRVPATH_WITH_DATE_INCOMPLETE" || continue - BACKUPSRVPATH_LINK_DEST="$($sshopts ls -d "$BACKUPSRVPATH_WITH_HOST/backup-*/$BACKUPDIR" 2>/dev/null | egrep -v incomplete$ | tail -n1)" + BACKUPSRVPATH_LINK_DEST="$($sshopts ls -dtr1 "$BACKUPSRVPATH_WITH_HOST/backup-*/$BACKUPDIR" 2>/dev/null | tail -n1)" # linkdest [ -n "$BACKUPSRVPATH_LINK_DEST" ] && rsyncoptsrun="$rsyncoptsrun --link-dest=$BACKUPSRVPATH_LINK_DEST" else