X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/371fa270c89ef7cb2929578394ea28c70cd9ff05..001bec529747e994540cbace860016591a323e33:/NextcloudBackup.sh diff --git a/NextcloudBackup.sh b/NextcloudBackup.sh index 5606883..4c735de 100644 --- a/NextcloudBackup.sh +++ b/NextcloudBackup.sh @@ -3,7 +3,7 @@ # # Bash script for creating backups of Nextcloud. # -# Version 2.1.0 +# Version 2.1.1 # # Usage: # - With backup directory specified in the script: ./NextcloudBackup.sh @@ -267,7 +267,7 @@ if [ ${maxNrOfBackups} != 0 ] then nrOfBackups=$(ls -l ${backupMainDir} | grep -c ^d) - if [[ ${nrOfBackups} > ${maxNrOfBackups} ]] + if [ ${nrOfBackups} -gt ${maxNrOfBackups} ] then echo "Removing old backups..." ls -t ${backupMainDir} | tail -$(( nrOfBackups - maxNrOfBackups )) | while read -r dirToRemove; do