16 lines
620 B
YAML
16 lines
620 B
YAML
pipeline {
|
|
agent any
|
|
stages {
|
|
stage ('Run Backup to David') {
|
|
steps {
|
|
script {
|
|
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} backupwinschoten@localhost:/storage/"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|