Skip to content

add backup of labels directory#206

Open
cafhach wants to merge 3 commits into
sue445:masterfrom
cafhach:master
Open

add backup of labels directory#206
cafhach wants to merge 3 commits into
sue445:masterfrom
cafhach:master

Conversation

@cafhach

@cafhach cafhach commented Jan 11, 2021

Copy link
Copy Markdown

"labels" directory is now backuped as well

Functional Account and others added 3 commits January 21, 2020 13:37
In the for-loop which creates the empty dirs in ARC_DIR, an entry for "labels" was missing.
bugfix: error if labels are present
@sue445 sue445 self-assigned this Jan 11, 2021
Comment thread jenkins-backup.sh
fi

if [ "$(ls -A ${JENKINS_HOME}/labels/)" ] ; then
cp -R "${JENKINS_HOME}/labels/"* "${ARC_DIR}/labels"

@sue445 sue445 Jan 11, 2021

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cafhach [MUST] Add a test case below to see if the labels directory is really archived

ARCHIVED_FILES = [
"jenkins-backup/hudson.model.UpdateCenter.xml",
"jenkins-backup/jobs/",
"jenkins-backup/jobs/example_job/",
"jenkins-backup/jobs/example_job/config.xml",
"jenkins-backup/jobs/space contain job/",
"jenkins-backup/jobs/space contain job/config.xml",
"jenkins-backup/jobs/example_folder/",
"jenkins-backup/jobs/example_folder/config.xml",
"jenkins-backup/jobs/example_folder/jobs/example_job_in_folder/",
"jenkins-backup/jobs/example_folder/jobs/example_job_in_folder/config.xml",
"jenkins-backup/jobs/example_folder/jobs/space contain job in folder/",
"jenkins-backup/jobs/example_folder/jobs/space contain job in folder/config.xml",
"jenkins-backup/nodes/",
"jenkins-backup/nodes/slave/",
"jenkins-backup/nodes/slave/config.xml",
"jenkins-backup/plugins/",
"jenkins-backup/plugins/dummy.hpi",
"jenkins-backup/plugins/dummy.hpi.pinned",
"jenkins-backup/plugins/dummy.jpi",
"jenkins-backup/plugins/dummy.jpi.pinned",
"jenkins-backup/secrets/",
"jenkins-backup/secrets/master.key",
"jenkins-backup/users/",
"jenkins-backup/users/sue445/",
"jenkins-backup/users/sue445/config.xml",
]

Comment thread jenkins-backup.sh
cp "${JENKINS_HOME}/"*.xml "${ARC_DIR}"

cp "${JENKINS_HOME}/.owner" "${ARC_DIR}"
ls "${JENKINS_HOME}/plugins" > ${ARC_DIR}/content_of_plugins_folder.txt

@sue445 sue445 Jan 11, 2021

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cafhach [QUESTION] Is this really necessary?

The subject of this PR is the addition of the labels directory, But I don't think this is relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants