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
- Stop the Jenkins service:
- Restore your backup archive or snapshot to
JENKINS_HOME. - Ensure correct ownership and permissions:
- Start Jenkins and verify logs for any errors: