]> git.p6c8.net - psmysqlbackup.git/blobdiff - psmysqlbackup.ps1
Rotate only if mysqldump succeeded
[psmysqlbackup.git] / psmysqlbackup.ps1
index 9292ed43dfa6eea857942fe6b7882242e579c9a5..d11f52e24ef8572493cc7785852bcbe8085c518f 100644 (file)
@@ -98,11 +98,10 @@ foreach($d in $databasesToBackup) {
     
     try {
         Create-Backup $d $databaseBackupFile
+        Rotate-Backups $databaseBackupDir
     }
     catch {
         Write-Output "Could not backup database $d to $databaseBackupFile"
         Write-Output $_
     }
-    
-    Rotate-Backups $databaseBackupDir
 }
\ No newline at end of file

patrick-canterino.de