Add f3 to databases list and cleanup loop

This commit is contained in:
2026-06-08 14:44:40 +02:00
parent dee16e451e
commit a7c775a27b
+2 -2
View File
@@ -14,7 +14,7 @@ $lockFile = "C:\lexware-db-connect\push-dump.lock"
$maxLines = 500
# Datenbanken die gedumpt werden sollen
$databases = @("f1", "f2", "lexkonto", "lexkk", "rk", "lxoffice", "lx", "lxcatalog")
$databases = @("f1", "f2", "f3", "lexkonto", "lexkk", "rk", "lxoffice", "lx", "lxcatalog")
$utf8NoBom = [System.Text.UTF8Encoding]::new($false)
@@ -122,7 +122,7 @@ $lines = Get-Content $hbaFile | Where-Object { $_ -notmatch "lxdump" }
# --- 6. Alte Dumps auf Linux aufraemen (nur letzte 5 pro DB behalten) ---
& ssh -i $sshKey -o StrictHostKeyChecking=no root@192.168.115.113 @"
for db in f1 f2 lexkonto lexkk rk lxoffice lx lxcatalog; do
for db in f1 f2 f3 lexkonto lexkk rk lxoffice lx lxcatalog; do
ls -t /opt/lexware-dumps/\${db}_*.dump 2>/dev/null | tail -n +6 | xargs -r rm -f
done
"@ 2>&1 | Out-Null