add examples to for CustomAction configuration

This commit is contained in:
Kevin Woley
2025-02-08 00:57:07 -08:00
parent eaf97cd2d7
commit f68ff68ae2
+17 -6
View File
@@ -1,5 +1,5 @@
# general configuration # general configuration
$InstallPath = "C:\restic" $InstallPath = "C:\restic_dev"
$ExeName = "restic.exe" $ExeName = "restic.exe"
$GlobalParameters = @() $GlobalParameters = @()
$LogRetentionDays = 30 $LogRetentionDays = 30
@@ -20,8 +20,9 @@ $AdditionalBackupParameters = @("--exclude-if-present", ".nobackup", "--no-scan"
# Paths to backup # Paths to backup
$BackupSources = @{} $BackupSources = @{}
$BackupSources["C:\"] = @( $BackupSources["C:\"] = @(
# "Users\Example\Desktop\Source1", "restic_dev",
# "Users\Example\Desktop\Source2" "restic",
"temp\directory with spaces"
) )
# $BackupSources["D:\"] = @( # $BackupSources["D:\"] = @(
# "Example\Source3", # "Example\Source3",
@@ -43,10 +44,20 @@ $SnapshotDeepMaintenanceDays = 90
$SelfUpdateEnabled = $true $SelfUpdateEnabled = $true
# (optional) custom actions # (optional) custom actions
# Define commands to pass to Invoke-Expression at script start and end # Define commands to pass to Invoke-Expression at script start and script end
# note: Errors will only be reported if the script does not eventually succeed. Errors # note: Errors will only be reported if the script does not eventually succeed. Errors
# from unsuccessful attempts to backup or maintain the repository will not result # from unsuccessful attempts to backup or maintain the repository will not result
# in the custom error action being called unless all attempts failed. # in the custom error action being called unless all attempts to backup or maintain failed.
$CustomActionStart = $null $CustomActionStart = $null
$CustomActionEndError = $null $CustomActionEndError = $null
$CustomActionEndSuccess = $null $CustomActionEndSuccess = $null
# Examples: Calling a healthcheck remote service
# $healthCheckURL = "https://healthcheckservice.com/etc/etc"
# $CustomActionStart = "Invoke-RestMethod $healthCheckURL/start"
# $CustomActionEndError = "Invoke-RestMethod $healthCheckURL/fail"
# $CustomActionEndSuccess = "Invoke-RestMethod $healthCheckURL"
# Example: Invoking a script
# $successScript = Join-Path $InstallPath "mySuccessScript.ps1"
# $CustomActionEndSuccess = "& $successScript"