Update jenkins/default_backup.yml

This commit is contained in:
2026-04-09 16:42:16 +02:00
parent cff05a3212
commit 366838f66a
-15
View File
@@ -4,7 +4,6 @@ pipeline {
booleanParam(name: 'backuplocally', defaultValue: params.backuplocally ?: false, description: 'If true local BORG backup will be created') booleanParam(name: 'backuplocally', defaultValue: params.backuplocally ?: false, description: 'If true local BORG backup will be created')
booleanParam(name: 'backuptostackstorage', defaultValue: false, description: 'If true backup data to TransIP Stack') booleanParam(name: 'backuptostackstorage', defaultValue: false, description: 'If true backup data to TransIP Stack')
booleanParam(name: 'backuptodavid', defaultValue: params.backuptodavid ?: false, description: 'If true rsync the BORG repository to David') booleanParam(name: 'backuptodavid', defaultValue: params.backuptodavid ?: false, description: 'If true rsync the BORG repository to David')
booleanParam(name: 'backuptopi', defaultValue: params.backuptopi ?: false, description: 'If true rsync the BORG repository to our ExternalPI')
booleanParam(name: 'backuptowinschoten', defaultValue: params.backuptowinschoten ?: false, description: 'If true rsync the BORG repository to our Winschoten backup system') booleanParam(name: 'backuptowinschoten', defaultValue: params.backuptowinschoten ?: false, description: 'If true rsync the BORG repository to our Winschoten backup system')
string(name: 'directory', defaultValue: params.directory ?: ' ', description: 'The directory that should be handled') string(name: 'directory', defaultValue: params.directory ?: ' ', description: 'The directory that should be handled')
text(name: 'excludelist', defaultValue: params.excludelist ?: '**/cache/** ', description: 'Multiline string to exclude patterns from backup') text(name: 'excludelist', defaultValue: params.excludelist ?: '**/cache/** ', description: 'Multiline string to exclude patterns from backup')
@@ -78,20 +77,6 @@ pipeline {
} }
} }
} }
stage('Run Rsync to External PI') {
steps {
script {
if (params.backuptopi) {
withCredentials([sshUserPrivateKey(credentialsId: '095cc365-ac40-4ddb-a078-2fa403092de0', keyFileVariable: 'keyfile', passphraseVariable: 'passphrase', usernameVariable: 'user')]) {
sh "cp ${keyfile} ${WORKSPACE}/keyfile"
sh "rsync -v -a -e 'ssh -i /home/borgbackup/.ssh/id_rsa -p 9898' --delete --info=progress2 ${env.borglocation}/${directory} borgbackup@localhost:/borgbackup/"
}
} else {
echo "Backup to External PI is skipped"
}
}
}
}
stage('Run Rsync Backup to Winschoten') { stage('Run Rsync Backup to Winschoten') {
steps { steps {
script { script {