]> git.p6c8.net - psmysqlbackup.git/commitdiff
Rotate only if mysqldump succeeded
authorPatrick Canterino <patrick@patrick-canterino.de>
Tue, 28 Dec 2021 18:52:15 +0000 (19:52 +0100)
committerPatrick Canterino <patrick@patrick-canterino.de>
Tue, 28 Dec 2021 18:52:15 +0000 (19:52 +0100)
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