X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/22bc4b2e4bbd70be86adf0bfb244b09e879478a4..1daae3ea97c6a3d34f9e94347ecbe74736dabf5b:/NextcloudBackup.sh?ds=sidebyside diff --git a/NextcloudBackup.sh b/NextcloudBackup.sh index a386464..ea817e4 100644 --- a/NextcloudBackup.sh +++ b/NextcloudBackup.sh @@ -128,7 +128,7 @@ if [ ${maxNrOfBackups} != 0 ] then nrOfBackups=$(ls -l ${backupMainDir} | grep -c ^d) - if [ ${maxNrOfBackups} > ${nrOfBackups}} ] + if [ ${maxNrOfBackups} > ${nrOfBackups} ] then echo "Removing old backups..." ls -t ${backupMainDir} | tail -$(( nrOfBackups - maxNrOfBackups )) | while read dirToRemove; do @@ -142,4 +142,4 @@ fi echo echo "DONE!" -echo "Backup created: ${backupdir}" \ No newline at end of file +echo "Backup created: ${backupdir}"