{"id":15045201,"url":"https://github.com/jenkinsci/thin-backup-plugin","last_synced_at":"2025-04-04T08:05:53.049Z","repository":{"id":5420742,"uuid":"6612211","full_name":"jenkinsci/thin-backup-plugin","owner":"jenkinsci","description":"Stores only the relevant parts of the Jenkins workspace in a Backup.","archived":false,"fork":false,"pushed_at":"2025-03-24T01:25:51.000Z","size":1779,"stargazers_count":98,"open_issues_count":5,"forks_count":83,"subscribers_count":100,"default_branch":"master","last_synced_at":"2025-03-28T07:05:02.320Z","etag":null,"topics":["backup","hacktoberfest","java","jenkins","jenkins-plugin","thin-backup-plugin"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/thinBackup/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-11-09T10:58:55.000Z","updated_at":"2025-03-15T12:49:54.000Z","dependencies_parsed_at":"2023-10-14T14:02:17.513Z","dependency_job_id":"f2aeada7-966a-427a-9de3-d8477e7bbe1f","html_url":"https://github.com/jenkinsci/thin-backup-plugin","commit_stats":{"total_commits":520,"total_committers":41,"mean_commits":"12.682926829268293","dds":0.6615384615384615,"last_synced_commit":"cef8686f6aeab707cb2518feee189d0d7eb39ad6"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fthin-backup-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fthin-backup-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fthin-backup-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fthin-backup-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/thin-backup-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142032,"owners_count":20890651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","hacktoberfest","java","jenkins","jenkins-plugin","thin-backup-plugin"],"created_at":"2024-09-24T20:51:34.845Z","updated_at":"2025-04-04T08:05:53.022Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thin Backup Plugin\n\n[![Build Status](https://ci.jenkins.io/job/Plugins/job/thin-backup-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/thin-backup-plugin/job/master/)\n[![GitHub release](https://img.shields.io/github/v/release/jenkinsci/thin-backup-plugin.svg?label=release)](https://github.com/jenkinsci/thin-backup-plugin/releases/latest)\n[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/thinBackup.svg?color=blue)](https://plugins.jenkins.io/thinBackup/)\n\nThis plugin simply backs up the global and job specific configurations (not the archive or the workspace). It can be scheduled and only backs up the most vital configuration info. It also let's you decide what vital means for you. For example it does backup the credentials.xml, but will not backup the server keys. Therefore any backup, which is used on an fresh server, will see the credentials, but is not able to correctly decrypt them. Therefore the credentials will be corrupt. So any migration use case will need the secrets additionally, or make use of the backup additional files feature.\nBe aware that in general the controller key should be stored somewhere else, as stated in the Jenkins [backup guidelines](https://www.jenkins.io/doc/book/system-administration/backing-up/#back-up-the-controller-key-separately).\n\n\u003c!-- TOC --\u003e\n* [Thin Backup Plugin](#thin-backup-plugin)\n  * [Documentation](#documentation)\n    * [Backup Now](#backup-now)\n    * [Restore](#restore)\n    * [Settings](#settings)\n  * [Jenkins Configuration as Code (JCasC) support](#jenkins-configuration-as-code-jcasc-support)\n  * [Backup process](#backup-process)\n  * [Feature requests or bug reports](#feature-requests-or-bug-reports)\n\u003c!-- TOC --\u003e\n## Documentation\n\nThis plugin adds a management link to \"Manage Jenkins\" in the Tools section, called ThinBackup which looks like this:\n\n![](images/ManagementLink.png)\n\nThis link provides the following actions:\n\n![](images/thinBackup.png)\n\n**Note:** If you are using a version older than 2.0 this will also contain a settings button, as illustrated in [this screenshot](/images/thinBackupOld.png)\n\n### Backup Now\n\nTriggers a manual full back up right now.\n\n### Restore\n\n![](images/restore.png)\n\nSelect the data of the backup you would like to restore.  After the restore finishes you are\nredirected to the plugin main page.  To activate the restored settings you need to restart Jenkins.\n\n**Note**: The file **nextBuildNumber** will not be backed up or restored to prevent buildnumber\ncollision by default.  The archive and the workspace will not be deleted or changed, but all backed\nup files will simply be overwritten with the restored versions (e.g., `config.xml`, `thinBackup.xml` \u0026rarr; for more info simply look in a backup).\n\n![](images/backupStore.png).\n\n#### Restore next build number file (if found in backup)\n\nIf this option is enabled, the file nextBuildNumber will also be restored.\n\n**Note**: Take special care when restoring a backup that contains a `nextBuildNumber` file, as this\nmay potentially cause a lot of problems.\n\n#### Restore plugins\n\nIf this option is enabled, the plugins get restored.  You need an active internet connection to the\nupdate server, because plugins will be downloaded from the update server to keep the backup small.\n\n### Settings\n\n**Note:** The settings are present in the global configuration since version 2.0 \n\n![](/images/thinBackupSettings.png)\n\n#### Backup directory\n\nSpecify the backup directory.  The Jenkins process needs write access to this directory.  You can\nuse environment variables like `${JENKINS_WORKSPACE}` to specify the path.\n\n#### Backup schedule for full backups\n\nSpecify schedule when a full backup is triggered.  Cron notation is used.  A full backup backs up\nall files even if there were no changes.\n\n#### Backup schedule for differential backups\n\nSpecify schedule when a differential backup is triggered.  Cron notation is used.  A differential\nbackup stores only modified data since the last full backup.  If there are no changes detected, no\ndiff backup will be created.\n\n**Note**: You do not need to specify a differential backup schedule if you only need full backups.\nBecause differential backups depend on full backups, a schedule for full backups is mandatory if you\nspecify a differential backup schedule.\n\n#### Wait until Jenkins is idle to perform a backup\n\nIt is very recommended to enable this option (default).  Nevertheless, many users report that the\nquiet mode is blocking execution of long-running jobs.  If you disable this option, then the backup\nwill be made without waiting for a safe state of your instance.  In other words, the backup will be\ndone immediately, and this could corrupt backups.\n\n#### Force Jenkins to quiet mode after specified amount of minutes\n\nForce a quiet mode after the specified time in minutes to force a safe environment for the back up.\nZero means the quiet mode if forced directly when the back up is triggered by the scheduler.  Read\nmore about the back up process below.\n\n#### Max number of backup sets\n\nTo save disk space, you can specify the maximum number of stored backup sets.  A backup set is\ndefined as a full backup together with its referencing diff backups.  Older backup sets will be\ndeleted after the next full backup action.  This also applies to zipped backup sets.\n\n#### Files excluded from backup\n\nIf you have specific files you do not want to backup, entering a regex here which identifies those\nfiles will prevent them being backed up.  All files with a name matching this regular expression\nwill not be backed up.  Leave empty if not needed.  If the expression is invalid, it will be\ndisregarded.\n\n#### Backup build results\n\nIf this option is enabled, build results will also be backed up.  This is potentially a lot of data,\nso think carefully about it.  Once you decide to backup build results, also get the option about\nbacking up your build archives.  Once again, be careful with this option because it could be very\n**time consuming** and probably needs **a ton of disk space**!\n\n#### Backup next build number file\nIf this option is enabled, the file `nextBuildNumber` will also be backed up.\n\n#### Backup 'config-history' folder\nIf this option is enabled, the directory `config-history` will also be backed up. The plugin which creates this folder is the [Job Configuration History Plugin](https://plugins.jenkins.io/jobConfigHistory/). \n\n#### Backup 'userContents'\n\nJenkins provides a URL where you can put common data (e.g., static HTML, Tools, etc.).  You can\nbackup all of this data if you check this option.\n\n#### Backup only builds marked to keep\n\nIf this option is enabled, only results/artifacts on builds which are marked \"Keep this build\nforever\" are backed up.\n\n#### Backup additional files\n\nThis feature enables the user to include additional files into the backup. For example to include fingerprints and the files for secrets; add the following regular expression : `(fingerprints|.*|.*|.*\\.xml)(secrets|.*\\..*)(secrets|.*)$`. \nThis allows the plugin to be used in migration scenarions. For example the secrets will not automatically by backuped, but are needed to descrypt the backuped credentials. Therefore the additional files field is needed to create a fully functional backup of your jenkins server data.\n\n\u003e ***Important***: Be aware that in general the controller key should be stored somewhere else, as stated in the Jenkins [backup guidelines](https://www.jenkins.io/doc/book/system-administration/backing-up/#back-up-the-controller-key-separately)\n\n#### Clean up differential backups\n\nIf this option is enabled, all differential backups are removed whenever a new full backup is done.\n\n#### Move old backups to ZIP files\n\nIf this is checked, then whenever a new full backup is performed, then all old backup sets will be\nmoved to ZIP files.  Each ZIP file will contain one backup set (i.e., one full backup and any\ndifferential backups referencing it).  The file name will identify the timeframe where the backups\nare included (i.e., the timestamp of the full backup and the timestamp of the latest differential\nbackup).\n\n**Note**: The setting \"Max number of backup sets\" applies to backup ZIP files created by *thinBackup*\nas well.\n\n**Note**: In case \"Clean up differential backups\" is checked, differential cleanup will be performed\nbefore zipping is done, and therefore no differential backups will be in the ZIP files.\n\n## Jenkins Configuration as Code (JCasC) support\n\nSince version 2.0 the plugin fully supports JCasC. An example config as a basis can be used from here.\n\n**Note**: Remember to escape backslashes in the YAML\n\n```yaml\nunclassified:\n  thinBackup:\n    backupAdditionalFiles: false\n    backupAdditionalFilesRegex: \"^.*\\\\.(txt)$\"\n    backupBuildArchive: false\n    backupBuildResults: true\n    backupBuildsToKeepOnly: false\n    backupConfigHistory: false\n    backupNextBuildNumber: false\n    backupPath: \"c:\\\\temp\\\\thin-backup\"\n    backupPluginArchives: false\n    backupUserContents: false\n    cleanupDiff: false\n    diffBackupSchedule: \"0 12 * * 1-5\"\n    excludedFilesRegex: \"^.*\\\\.(log)$\"\n    failFast: true\n    forceQuietModeTimeout: 120\n    fullBackupSchedule: \"0 12 * * 1\"\n    moveOldBackupsToZipFile: false\n    nrMaxStoredFull: -1\n    waitForIdle: true\n```\n\n## Backup process\n\nBecause many of you are asking why Jenkins is going to shutdown when a backup is triggered, I\ndecided to explain my ideas behind the backup process.\n\nFirst of all, **Jenkins will not be shutdown at any time**.  Second, I use the built-in quiet mode\n(Jenkins is going to shutdown) to ensure a safe environment during the backup process and cancel\nthe quiet mode afterward.  This could be misleading, **but there is no point where Jenkins will be\nshutdown**.\n\nSo, what is a safe environment?  A safe environment would mean that no jobs are running. Because a\nrunning job could change a file in the workspace (results, build output, etc.), in this case the\nfile could be locked. This situation should be avoided by using the quiet mode.\n\nHere is an example of how it works:\n- The scheduler triggers a backup.\n- There are active jobs and some jobs are waiting in the queue.\n- The backup waits for a safe environment (recommended way).  This means running jobs will be\n  finished in any case.  Waiting jobs will be started as long as Jenkins is not in quiet mode.  The\n  \"Force Jenkins to quiet mode after specified minutes\" option will force Jenkins after the\n  specified time into quiet mode.  From this point, no further jobs will be started until the backup\n  is finished.\n  - In the case of \"Wait until Jenkins is idle to perform a backup\" is disabled, then the backup\n    will be done immediately.\n- The backup starts when no job is running.\n- Once the backup is finished the quiet mode will be canceled.  Manually canceling the quiet mode\n  will force a new quiet period.\n\n## Feature requests or bug reports\n\nPlease let us know if you have another option or feature for this plugin by entering an issue or\nwrite us an email.\n\nBefore submitting a feature request or bug report, you can check if it has already been submitted by\nsearching issues in JIRA categorized under the thin-backup-plugin component or directly on the [plugin site](https://plugins.jenkins.io/thinBackup/#issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fthin-backup-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fthin-backup-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fthin-backup-plugin/lists"}