X-Git-Url: https://git.p6c8.net/dsmonrot.git/blobdiff_plain/26ed9f00445f833c5416d9174db4c4ad03dfec89..b682465a47a8431a7d30e9eb29340133a4d4f2f3:/dsmonrot.ps1 diff --git a/dsmonrot.ps1 b/dsmonrot.ps1 index 7012cf1..54c0972 100644 --- a/dsmonrot.ps1 +++ b/dsmonrot.ps1 @@ -42,6 +42,10 @@ # 0 or less for indefinite # You should set this to at least the same as $keepMonths [Int32]$keepLogs = 2 +# Comma separated lists of files and directories to exclude from the backup +# See http://www.drivesnapshot.de/en/commandline.htm +# Comment out if you don't want to use it +#[String]$excludedPaths = "Path1,Path2" # Map network share to this drive letter, comment out if you don't want to use it [String]$smbDrive = "Z" @@ -327,8 +331,13 @@ if($errorMessages.Count -eq 0) { $backupTargetDiff = $backupTargetDiff + "-" + $currTime } + # Compose the "exclude" parameter if necessary + if($excludedPaths) { + $dsAdditionalArgs += "--exclude:" + $excludedPaths + } + # Check if the backup target for this month, the directory for the full backup - # and the hash files exists. In this case we do a differential backup. + # and the hash files exist. In that case we do a differential backup. if((Test-Path $backupTarget) -and (Test-Path $backupTargetFull) -and (Test-Path "$backupTargetFull\*.hsh")) { # Do a differential backup