tweaky
This commit is contained in:
+19
-13
@@ -69,22 +69,28 @@ pipeline {
|
||||
stage('Rsync TEST') {
|
||||
failFast false
|
||||
parallel {
|
||||
steps {
|
||||
script {
|
||||
if (params.backuptodavid) {
|
||||
sh "rsync -v -a -e 'ssh -p 664' --delete --bwlimit=3000 --info=progress2 ${env.borglocation}/${directory} matthias@home.daf2000.nl:/media/disk/borgbackup/"
|
||||
} else {
|
||||
echo "Backup to David is skipped"
|
||||
stage ('Run Backup to David') {
|
||||
steps {
|
||||
script {
|
||||
if (params.backuptodavid) {
|
||||
sh "rsync -v -a -e 'ssh -p 664' --delete --bwlimit=3000 --info=progress2 ${env.borglocation}/${directory} matthias@home.daf2000.nl:/media/disk/borgbackup/"
|
||||
} else {
|
||||
echo "Backup to David is skipped"
|
||||
}
|
||||
}
|
||||
}
|
||||
script {
|
||||
if (params.backuptowinschoten) {
|
||||
withCredentials([sshUserPrivateKey(credentialsId: 'backupwinschoten', keyFileVariable: 'keyfile', passphraseVariable: 'passphrase', usernameVariable: 'user')]) {
|
||||
sh "cp ${keyfile} ${WORKSPACE}/keyfile"
|
||||
sh "rsync -v -a -e 'ssh -i /home/backupwinschoten/.ssh/id_rsa -p 9897' --delete --info=progress2 ${env.borglocation}/${directory} backupwinschoten@localhost:/storage/borgbackups/"
|
||||
}
|
||||
stage ('Run Backup to Winschoten') {
|
||||
steps {
|
||||
script {
|
||||
if (params.backuptowinschoten) {
|
||||
withCredentials([sshUserPrivateKey(credentialsId: 'backupwinschoten', keyFileVariable: 'keyfile', passphraseVariable: 'passphrase', usernameVariable: 'user')]) {
|
||||
sh "cp ${keyfile} ${WORKSPACE}/keyfile"
|
||||
sh "rsync -v -a -e 'ssh -i /home/backupwinschoten/.ssh/id_rsa -p 9897' --delete --info=progress2 ${env.borglocation}/${directory} backupwinschoten@localhost:/storage/borgbackups/"
|
||||
}
|
||||
} else {
|
||||
echo "Backup to Winschoten is skipped"
|
||||
}
|
||||
} else {
|
||||
echo "Backup to Winschoten is skipped"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user