fixed sshfs

This commit is contained in:
matthias
2026-05-08 20:30:15 +02:00
parent 5e71088b97
commit f1114cd2bb
+3 -4
View File
@@ -7,13 +7,12 @@ pipeline {
agent { label params['agentname'] }
environment {
BORG_RELOCATED_REPO_ACCESS_IS_OK = 'yes'
backdirectory = "/" + "${directory}"
}
stages {
stage('Run Preparation') {
steps {
echo "Backing up directory ${backdirectory}"
echo "Backing up directory ${directory}"
sh "echo '${params.excludelist}' >> excludelist"
}
}
@@ -24,8 +23,8 @@ pipeline {
sh "mkdir -p ${WORKSPACE}/tmpmount"
sh "sshfs -o IdentityFile=~/.ssh/id_rsa root@10.10.1.32:/${env.borglocation}/${directory} ${WORKSPACE}/tmpmount"
withCredentials([string(credentialsId: 'cbce976a-0d98-4f35-8ea2-1f7818931bc3', variable: 'BORG_PASSPHRASE')]) {
sh "borg create --progress --stats --exclude-from excludelist ${backdirectory}::${java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('dd-MM-yyyy_HH:mm'))} /${directory}"
sh "borg prune --list --keep-daily 31 --keep-weekly 48 ${backdirectory}"
sh "borg create --progress --stats --exclude-from excludelist ${WORKSPACE}/tmpmount/${directory}::${java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('dd-MM-yyyy_HH:mm'))} /${directory}"
sh "borg prune --list --keep-daily 31 --keep-weekly 48 ${WORKSPACE}/tmpmount/${directory}"
}
}
}