From 01bd37425911a0bef8bc6cf37302b8808eaf4a04 Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Tue, 28 Feb 2023 20:24:28 +0100 Subject: [PATCH] Create-Backup -> Invoke-DatabaseBackup "Create" is no approved verb in PowerShell --- psmysqlbackup.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { -- 2.34.1