X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/22bc4b2e4bbd70be86adf0bfb244b09e879478a4..b19ec146d12b55e2aba8662dc599309c3c07260f:/NextcloudBackup.sh?ds=inline 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}"