wrong storage location

This commit is contained in:
matthias
2026-05-08 19:11:32 +02:00
parent b2b1b4e056
commit aace7a4f86
2 changed files with 3 additions and 9 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ pipeline {
steps { steps {
script { script {
withCredentials([string(credentialsId: 'cbce976a-0d98-4f35-8ea2-1f7818931bc3', variable: 'BORG_PASSPHRASE')]) { 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'))} ${backdirectory}" sh "borg create --progress --stats --exclude-from excludelist ${backdirectory}::${java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('dd-MM-yyyy_HH:mm'))} ${env.storagelocation}/${directory}"
sh "borg prune --list --keep-daily 31 --keep-weekly 48 ${backdirectory}" sh "borg prune --list --keep-daily 31 --keep-weekly 48 ${backdirectory}"
} }
} }
-6
View File
@@ -1,6 +1,5 @@
pipeline { pipeline {
parameters { parameters {
booleanParam(name: 'UseLocationPrefix', defaultValue: params.backuplocally ?: true, description: 'Use the environmental backup location')
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')
string(name: 'agentname', defaultValue: params.agentname ?: 'julien', description: 'The agent to run this backup on') string(name: 'agentname', defaultValue: params.agentname ?: 'julien', description: 'The agent to run this backup on')
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')
@@ -14,15 +13,10 @@ pipeline {
stages { stages {
stage('Run Preparation') { stage('Run Preparation') {
steps { steps {
script {
if (params.UseLocationPrefix) {
backdirectory = env.borglocation + "/" + "${directory}"
}
echo "Backing up directory ${backdirectory}" echo "Backing up directory ${backdirectory}"
sh "echo '${params.excludelist}' >> excludelist" sh "echo '${params.excludelist}' >> excludelist"
} }
} }
}
stage('Create local BorgBackup') { stage('Create local BorgBackup') {
steps { steps {