From 63bcdf5c7f69b4cfae9243cda252e8239a342226 Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 31 Oct 2025 01:05:31 +0200 Subject: [PATCH] copiere backup --- oracle/standby-server-scripts/transfer_to_dr.ps1 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/oracle/standby-server-scripts/transfer_to_dr.ps1 b/oracle/standby-server-scripts/transfer_to_dr.ps1 index 80d0487..f07e3b7 100644 --- a/oracle/standby-server-scripts/transfer_to_dr.ps1 +++ b/oracle/standby-server-scripts/transfer_to_dr.ps1 @@ -44,10 +44,8 @@ function Test-SSHConnection { } function Get-TodaysBackups { - Write-Log "Searching for today's backup files..." + Write-Log "Searching for backup files..." - $today = Get-Date - $cutoffDate = $today.Date # Only today (after midnight) $backupFiles = @() $searchPaths = @( @@ -57,10 +55,9 @@ function Get-TodaysBackups { foreach ($path in $searchPaths) { if (Test-Path $path) { - # Get files created TODAY only (exclude old backups) + # Get ALL backup files (duplicates will be skipped during transfer) $files = Get-ChildItem -Path $path -Recurse -File -ErrorAction SilentlyContinue | Where-Object { - $_.LastWriteTime -gt $cutoffDate -and $_.Name -notlike "*__TAG_*" # Exclude old uncompressed backups } | Sort-Object LastWriteTime -Descending @@ -70,7 +67,7 @@ function Get-TodaysBackups { } if ($backupFiles.Count -eq 0) { - Write-Log "No backup files found for today!" "WARNING" + Write-Log "No backup files found!" "WARNING" return @() }