fixed error handling for winschoten, too

This commit is contained in:
matthias
2026-05-13 08:26:06 +02:00
parent c787fb51e2
commit 2887e2f15b
+2 -2
View File
@@ -63,8 +63,8 @@ pipeline {
steps { steps {
script { script {
if (params.backuptowinschoten) { if (params.backuptowinschoten) {
sh "ssh -p 9897 backupwinschoten@localhost cp -rf /storage/nextcloud_backup/database_dump/backup_previous.dmp /storage/nextcloud_backup/database_dump/backup_early.dmp" sh "ssh -p 9897 backupwinschoten@localhost yes | cp -rf /storage/nextcloud_backup/database_dump/backup_previous.dmp /storage/nextcloud_backup/database_dump/backup_early.dmp 2>/dev/null || :"
sh "ssh -p 9897 backupwinschoten@localhost cp -rf /storage/nextcloud_backup/database_dump/backup_latest.dmp /storage/nextcloud_backup/database_dump/backup_previous.dmp" sh "ssh -p 9897 backupwinschoten@localhost yes | cp -rf /storage/nextcloud_backup/database_dump/backup_latest.dmp /storage/nextcloud_backup/database_dump/backup_previous.dmp 2>/dev/null || :"
sh "rsync -v -a -e 'ssh -i /home/backupwinschoten/.ssh/id_rsa -p 9897' --delete --info=progress2 /srv/dev-disk-by-uuid-27fc012e-a1fa-4c7c-9dad-82770888cd03/nextcloud_backup/database_dump/ backupwinschoten@localhost:/storage/nextcloud_backup/database_dump/" sh "rsync -v -a -e 'ssh -i /home/backupwinschoten/.ssh/id_rsa -p 9897' --delete --info=progress2 /srv/dev-disk-by-uuid-27fc012e-a1fa-4c7c-9dad-82770888cd03/nextcloud_backup/database_dump/ backupwinschoten@localhost:/storage/nextcloud_backup/database_dump/"
} else { } else {
echo "Backup to Winschoten is skipped" echo "Backup to Winschoten is skipped"