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