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

View File

@@ -1,5 +1,5 @@
# general configuration
$InstallPath = "C:\restic"
$InstallPath = "C:\restic_dev"
$ExeName = "restic.exe"
$GlobalParameters = @()
$LogRetentionDays = 30
@@ -20,8 +20,9 @@ $AdditionalBackupParameters = @("--exclude-if-present", ".nobackup", "--no-scan"
# Paths to backup
$BackupSources = @{}
$BackupSources["C:\"] = @(
# "Users\Example\Desktop\Source1",
# "Users\Example\Desktop\Source2"
"restic_dev",
"restic",
"temp\directory with spaces"
)
# $BackupSources["D:\"] = @(
# "Example\Source3",
@@ -43,10 +44,20 @@ $SnapshotDeepMaintenanceDays = 90
$SelfUpdateEnabled = $true
# (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
# 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
$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"