title: Jenkins: Thinbackup Plugin compared to manual backup
body: <p>I'm looking at ways to automatically backup our instance of Jenkins on a regular basis. One of the strategies I've seen for this is using the <a href="https://wiki.jenkins.io/display/JENKINS/thinBackup" rel="nofollow noreferrer">thinBackup Plugin</a>.</p>
  <p>I've taken a look at the directory containing the backup that thinBackup creates, and it seems to have substantially different directory structure and files than Jenkins home directory does.</p>
  <p><strong>thinBackup backup directory</strong>:</p>
  <pre><code>drwxr-xr-x  7 jenkins jenkins 4096 Jun 22 14:57 ./
  drwxrwxr-x+ 3 root    root    4096 Jun 22 14:57 ../
  -rw-r--r--  1 jenkins jenkins 3159 Jun 21 17:24 config.xml
  -rw-r--r--  1 jenkins jenkins  978 Jun  5 10:10 credentials.xml
  -rw-r--r--  1 jenkins jenkins  135 Jun 21 17:24 github-plugin-configuration.xml
  -rw-r--r--  1 jenkins jenkins  808 Jun 21 17:24 hudson.maven.MavenModuleSet.xml
  -rw-r--r--  1 jenkins jenkins  159 Jun 22 14:01 hudson.model.UpdateCenter.xml
  -rw-r--r--  1 jenkins jenkins 1169 Jun 21 17:24 hudson.plugins.emailext.ExtendedEmailPublisher.xml
  -rw-r--r--  1 jenkins jenkins  320 Jun 21 17:24 hudson.plugins.git.GitSCM.xml
  -rw-r--r--  1 jenkins jenkins  370 May 31 08:51 hudson.plugins.git.GitTool.xml
  -rw-r--r--  1 jenkins jenkins  513 Jun 21 17:24 hudson.scm.CVSSCM.xml
  -rw-r--r--  1 jenkins jenkins  388 Jun 21 17:24 hudson.scm.SubversionSCM.xml
  -rw-r--r--  1 jenkins jenkins  188 Jun 21 17:24 hudson.tasks.Mailer.xml
  -rw-r--r--  1 jenkins jenkins   76 Jun 21 17:24 hudson.tasks.Shell.xml
  -rw-r--r--  1 jenkins jenkins  215 Jun 21 17:24 hudson.triggers.SCMTrigger.xml
  -rw-r--r--  1 jenkins jenkins 6515 Jun 22 14:57 installedPlugins.xml
  -rw-r--r--  1 jenkins jenkins   93 Jun 21 17:17 jenkins.CLI.xml
  -rw-r--r--  1 jenkins jenkins  159 Jun 21 17:24 jenkins.model.ArtifactManagerConfiguration.xml
  -rw-r--r--  1 jenkins jenkins  138 Jun 21 17:17 jenkins.model.DownloadSettings.xml
  -rw-r--r--  1 jenkins jenkins  264 Jun 21 17:24 jenkins.model.JenkinsLocationConfiguration.xml
  -rw-r--r--  1 jenkins jenkins  535 Jun 21 17:24 jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml
  -rw-r--r--  1 jenkins jenkins  472 Jun 21 17:17 jenkins.security.QueueItemAuthenticatorConfiguration.xml
  -rw-r--r--  1 jenkins jenkins  381 Jun 21 17:17 jenkins.security.UpdateSiteWarningsConfiguration.xml
  -rw-r--r--  1 jenkins jenkins  630 Jun 21 17:24 jobConfigHistory.xml
  drwxr-xr-x  6 jenkins jenkins 4096 Jun 22 14:57 jobs/
  -rw-r--r--  1 jenkins jenkins  907 Jun 22 14:01 nodeMonitors.xml
  drwxr-xr-x  5 jenkins jenkins 4096 Jun 21 15:20 nodes/
  -rw-r--r--  1 jenkins jenkins  270 Jun 21 17:24 org.jenkinsci.plugins.bitbucket_approve.BitbucketApprover.xml
  -rw-r--r--  1 jenkins jenkins  290 Jun 21 17:24 org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.xml
  -rw-r--r--  1 jenkins jenkins  290 Jun 21 17:24 org.jenkinsci.plugins.pipeline.modeldefinition.config.GlobalConfig.xml
  -rw-r--r--  1 jenkins jenkins   46 Jun 21 17:00 org.jenkinsci.plugins.workflow.flow.FlowExecutionList.xml
  -rw-r--r--  1 jenkins jenkins  218 Jun 21 17:24 org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml
  drwxr-xr-x  2 jenkins jenkins 4096 Jun 22 14:57 plugins/
  -rw-r--r--  1 jenkins jenkins 1015 Jun 22 14:57 thinBackup.xml
  drwxr-xr-x  2 jenkins jenkins 4096 May 25 13:29 userContent/
  drwxr-xr-x  3 jenkins jenkins 4096 Jun  5 11:27 users/
  </code></pre>
  <p><strong>Jenkins home directory</strong>:</p>
  <pre><code>drwxr-xr-x 17 jenkins jenkins     4096 Jun 22 14:57 ./
  drwxr-xr-x 74 root    root        4096 Jun 22 14:17 ../
  drwxr-xr-x 31 jenkins jenkins     4096 Jun 22 14:57 config-history/
  -rw-r--r--  1 jenkins jenkins     3159 Jun 21 17:24 config.xml
  -rw-r--r--  1 jenkins jenkins      978 Jun  5 10:10 credentials.xml
  -rw-r--r--  1 jenkins jenkins      135 Jun 21 17:24 github-plugin-configuration.xml
  drwxr-xr-x  3 jenkins jenkins     4096 Jun 19 09:20 .groovy/
  -rw-r--r--  1 jenkins jenkins      808 Jun 21 17:24 hudson.maven.MavenModuleSet.xml
  -rw-r--r--  1 jenkins jenkins      159 Jun 22 14:01 hudson.model.UpdateCenter.xml
  -rw-r--r--  1 jenkins jenkins     1169 Jun 21 17:24 hudson.plugins.emailext.ExtendedEmailPublisher.xml
  -rw-r--r--  1 jenkins jenkins      320 Jun 21 17:24 hudson.plugins.git.GitSCM.xml
  -rw-r--r--  1 jenkins jenkins      370 May 31 08:51 hudson.plugins.git.GitTool.xml
  -rw-r--r--  1 jenkins jenkins      513 Jun 21 17:24 hudson.scm.CVSSCM.xml
  -rw-r--r--  1 jenkins jenkins      388 Jun 21 17:24 hudson.scm.SubversionSCM.xml
  -rw-r--r--  1 jenkins jenkins      188 Jun 21 17:24 hudson.tasks.Mailer.xml
  -rw-r--r--  1 jenkins jenkins       76 Jun 21 17:24 hudson.tasks.Shell.xml
  -rw-r--r--  1 jenkins jenkins      215 Jun 21 17:24 hudson.triggers.SCMTrigger.xml
  -rw-------  1 jenkins jenkins     1712 May 25 13:29 identity.key.enc
  drwxr-xr-x  3 jenkins jenkins     4096 May 25 13:28 .java/
  -rw-r--r--  1 jenkins jenkins       93 Jun 21 17:17 jenkins.CLI.xml
  -rw-r--r--  1 jenkins jenkins        6 May 26 09:19 jenkins.install.InstallUtil.lastExecVersion
  -rw-r--r--  1 jenkins jenkins        6 May 25 13:29 jenkins.install.UpgradeWizard.state
  -rw-r--r--  1 jenkins jenkins      159 Jun 21 17:24 jenkins.model.ArtifactManagerConfiguration.xml
  -rw-r--r--  1 jenkins jenkins      138 Jun 21 17:17 jenkins.model.DownloadSettings.xml
  -rw-r--r--  1 jenkins jenkins      264 Jun 21 17:24 jenkins.model.JenkinsLocationConfiguration.xml
  -rw-r--r--  1 jenkins jenkins      535 Jun 21 17:24 jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml
  -rw-r--r--  1 jenkins jenkins      472 Jun 21 17:17 jenkins.security.QueueItemAuthenticatorConfiguration.xml
  -rw-r--r--  1 jenkins jenkins      381 Jun 21 17:17 jenkins.security.UpdateSiteWarningsConfiguration.xml
  -rw-r--r--  1 root    root           0 Jun 22 08:35 jenkins.start
  -rw-r--r--  1 jenkins jenkins 70340821 May 26 09:28 jenkins.war
  -rw-r--r--  1 jenkins jenkins      630 Jun 21 17:24 jobConfigHistory.xml
  drwxr-xr-x  6 jenkins jenkins     4096 Jun 19 14:44 jobs/
  drwxr-xr-x  4 jenkins jenkins     4096 Jun 21 15:01 logs/
  -rw-r--r--  1 jenkins jenkins      907 Jun 22 14:01 nodeMonitors.xml
  drwxr-xr-x  5 jenkins jenkins     4096 Jun 21 15:20 nodes/
  drwxr-xr-x  2 jenkins jenkins     4096 May 25 13:28 .oracle_jre_usage/
  -rw-r--r--  1 jenkins jenkins      270 Jun 21 17:24 org.jenkinsci.plugins.bitbucket_approve.BitbucketApprover.xml
  -rw-r--r--  1 jenkins jenkins      290 Jun 21 17:24 org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.xml
  -rw-r--r--  1 jenkins jenkins      290 Jun 21 17:24 org.jenkinsci.plugins.pipeline.modeldefinition.config.GlobalConfig.xml
  -rw-r--r--  1 jenkins jenkins       46 Jun 21 17:00 org.jenkinsci.plugins.workflow.flow.FlowExecutionList.xml
  -rw-r--r--  1 jenkins jenkins      218 Jun 21 17:24 org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml
  -rw-r--r--  1 jenkins jenkins       54 Jun 22 13:59 .owner
  drwxr-xr-x 72 jenkins jenkins    12288 Jun 22 14:01 plugins/
  -rw-r--r--  1 jenkins jenkins      130 Jun 22 14:01 queue.xml.bak
  -rw-r--r--  1 jenkins jenkins       64 May 25 13:28 secret.key
  -rw-r--r--  1 jenkins jenkins        0 May 25 13:28 secret.key.not-so-secret
  drwx------  4 jenkins jenkins     4096 Jun 21 15:01 secrets/
  drwx------  2 jenkins jenkins     4096 Jun  2 17:21 .ssh/
  -rw-r--r--  1 jenkins jenkins        0 Jun 22 14:58 ThinBackup Worker Thread.log
  -rw-r--r--  1 jenkins jenkins     1015 Jun 22 14:57 thinBackup.xml
  drwxr-xr-x  2 jenkins jenkins     4096 Jun 22 08:36 updates/
  drwxr-xr-x  2 jenkins jenkins     4096 May 25 13:29 userContent/
  drwxr-xr-x  3 jenkins jenkins     4096 Jun  5 11:27 users/
  drwxr-xr-x 10 jenkins jenkins     4096 May 26 09:28 war/
  drwxr-xr-x  2 jenkins jenkins     4096 Jun 19 09:20 workflow-libs/
  </code></pre>
  <ul>
  <li>Are there any folders / files in Jenkins home directory that the
  thinBackup misses in doing a backup?</li>
  </ul>
  <p>I've <a href="https://support.cloudbees.com/hc/en-us/articles/216241937-Migrating-Jenkins-instances" rel="nofollow noreferrer">read</a> that copying Jenkins home directory from one server with Jenkins installed to another server with Jenkins installed is the general process for migrating a Jenkins instance to another server.</p>
  <ul>
  <li>Is it best practice to err on the side of caution and backup the entire Jenkins home directory somewhere?</li>
  <li>If this is the case, what is the best way to automate this process so
  that backups are automatically made on a regular basis?</li>
  </ul>
  <p>I want to avoid a situation where an issue occurs and we're missing necessary files to restore the pre-disaster Jenkins instance's configuration.</p>
  <p>I'm fairly new to Jenkins administration so any advice, guidance and information is welcome. Thanks in advance for any help!</p>