]> git.p6c8.net - nextcloud-backup-restore.git/blobdiff - NextcloudBackup.sh
Merge pull request #1 from BernieO/patch-1
[nextcloud-backup-restore.git] / NextcloudBackup.sh
index a3864641f44f960c44363359f439b4f139176459..ea817e49cabd6141720bfadf2bad66d44d730cc4 100644 (file)
@@ -128,7 +128,7 @@ if [ ${maxNrOfBackups} != 0 ]
 then   
        nrOfBackups=$(ls -l ${backupMainDir} | grep -c ^d)
        
 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
        then
                echo "Removing old backups..."
                ls -t ${backupMainDir} | tail -$(( nrOfBackups - maxNrOfBackups )) | while read dirToRemove; do
@@ -142,4 +142,4 @@ fi
 
 echo
 echo "DONE!"
 
 echo
 echo "DONE!"
-echo "Backup created: ${backupdir}"
\ No newline at end of file
+echo "Backup created: ${backupdir}"

patrick-canterino.de