Skip to main content
Ensuring regular backups of your Jenkins instance is vital for disaster recovery, maintaining data integrity, and quickly restoring accidentally deleted configurations. This guide walks you through various backup methods and highlights the critical directories and files you should preserve.
Schedule your backups according to your change management policy—daily incremental snapshots plus weekly full backups often strike a good balance between data safety and storage cost.

Backup Approaches

Choose one or combine multiple methods to build a resilient backup strategy:

Essential Files and Directories

Jenkins stores all configuration, job definitions, plugins, and credentials in the JENKINS_HOME directory (default: /var/lib/jenkins). Backing up the entire directory is feasible but may be overkill. Focus on the components below:
Never store unencrypted secret keys or credentials in public or shared backup locations. Always encrypt backups that include the secrets/ directory.

Restoring Jenkins

  1. Stop the Jenkins service:
  2. Restore your backup archive or snapshot to JENKINS_HOME.
  3. Ensure correct ownership and permissions:
  4. Start Jenkins and verify logs for any errors:

Watch Video