From: Patrick Canterino Date: Tue, 28 Feb 2023 19:24:28 +0000 (+0100) Subject: Create-Backup -> Invoke-DatabaseBackup X-Git-Url: https://git.p6c8.net/psmysqlbackup.git/commitdiff_plain Create-Backup -> Invoke-DatabaseBackup "Create" is no approved verb in PowerShell --- diff --git a/psmysqlbackup.ps1 b/psmysqlbackup.ps1 index 6177abd..b728bb0 100644 --- a/psmysqlbackup.ps1 +++ b/psmysqlbackup.ps1 @@ -173,7 +173,7 @@ function Get-Databases() { return $databases } -function Create-Backup([String]$database, [String]$target) { +function Invoke-DatabaseBackup([String]$database, [String]$target) { & $configMysqldumpCli --host=$configMysqlHost --port=$configMysqlPort --user=$configMysqlUser --password=$configMysqlPassword --single-transaction --result-file=$target $database if($LastExitCode -ne 0) { @@ -299,7 +299,7 @@ foreach($d in $databasesToBackup) { } try { - Create-Backup $d $databaseBackupFile + Invoke-DatabaseBackup $d $databaseBackupFile Invoke-FileRotation -Dir $databaseBackupDir -MaxFiles $configBackupRotate -Pattern $patternBackupFile -LogFile $logFile } catch {