-
Notifications
You must be signed in to change notification settings - Fork 361
Added plugin git_backup #1439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MauroDruwel
wants to merge
1
commit into
OctoPrint:gh-pages
Choose a base branch
from
MauroDruwel:gh-pages
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+74
−0
Open
Added plugin git_backup #1439
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| layout: plugin | ||
|
|
||
| id: git_backup | ||
| title: Git Backup Plugin | ||
| description: Automatically push OctoPrint backups to a remote Git repository after each backup is created. One-click install and auth setup for apt-based systems (Raspberry Pi OS, Ubuntu, Debian). | ||
| authors: | ||
| - Mauro Druwel | ||
| license: MIT | ||
|
|
||
| date: 2026-05-14 | ||
|
|
||
| homepage: https://github.com/MauroDruwel/OctoPrint-Git-Backup | ||
| source: https://github.com/MauroDruwel/OctoPrint-Git-Backup | ||
| archive: https://github.com/MauroDruwel/OctoPrint-Git-Backup/archive/main.zip | ||
|
|
||
| tags: | ||
| - backup | ||
| - git | ||
| - github | ||
| - configuration | ||
| - automation | ||
| - version control | ||
|
|
||
| screenshots: | ||
| - url: /assets/img/plugins/git_backup/settings.png | ||
| alt: Git Backup Plugin settings panel showing repo URL, status checks and tips | ||
| caption: Settings panel with live auth status and one-click setup | ||
| - url: /assets/img/plugins/git_backup/backup-repo.png | ||
| alt: GitHub repository receiving automatic OctoPrint backup commits | ||
| caption: Every backup becomes a git commit in your private repo | ||
|
|
||
| featuredimage: /assets/img/plugins/git_backup/settings.png | ||
|
|
||
| compatibility: | ||
| octoprint: | ||
| - 1.6.0 | ||
|
|
||
| os: | ||
| - linux | ||
| - windows | ||
| - macos | ||
| - freebsd | ||
|
|
||
| python: ">=3,<4" | ||
|
|
||
| --- | ||
|
|
||
| Automatically pushes OctoPrint backups to a remote Git repository every time a backup is created. Once configured with a repo URL, every new backup is committed and pushed, keeping a full version-controlled history of your printer's configuration. | ||
|
|
||
| While GitHub is the primary target (with built-in GitHub CLI setup helpers), **any git remote works**, GitLab, Gitea, Bitbucket, self-hosted, as long as the host running OctoPrint is authenticated at the OS level (SSH key, credential manager, or `gh auth login` for GitHub). | ||
|
|
||
| ## Features | ||
|
|
||
| - **Automatic**, listens for backup events and pushes without any manual steps | ||
| - **Version-controlled history**, every backup is a git commit; roll back any time | ||
| - **No stored credentials**, uses your OS-level GitHub CLI token (`gh auth login`), nothing is saved in the plugin | ||
| - **Optional auto-delete**, remove the local `.zip` after a successful push to save disk space | ||
| - **README-safe**, existing `README.md` in the repo is never overwritten by backup contents | ||
| - **Live auth status panel**, shows git/gh CLI status and credential helper setup in the OctoPrint settings UI | ||
| - **One-click setup buttons**, install git, install gh CLI, and run `gh auth login` directly from the settings panel (apt-based systems) | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Create a **private** GitHub repository (backups may contain API keys and credentials) | ||
| 2. Enter the repository URL in the plugin settings | ||
| 3. Authenticate, on Raspberry Pi OS / Ubuntu / Debian the settings panel has one-click buttons for `git`, `gh CLI`, and `gh auth login`. On other systems set up git auth at the OS level (SSH key or credential manager) | ||
| 4. Trigger a backup from OctoPrint, the plugin pushes it automatically | ||
|
|
||
| ## Tips | ||
|
|
||
| - Exclude **timelapses** and **uploads** from your OctoPrint backups (Settings, Backup & Restore, Create backup) to keep the repo small. GitHub rejects files over 100 MB. | ||
| - Want timelapses without the storage cost? [YouTube Timelapse](https://plugins.octoprint.org/plugins/youtube_timelapse/) uploads them directly to YouTube. | ||
| - Want scheduled backups? [Backup Scheduler](https://plugins.octoprint.org/plugins/backup_scheduler/) triggers OctoPrint backups on a timer, this plugin will push each one automatically. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this plugin is windows compatible due to the use of apt install commands. The other functions may work/exist in Windows though possibly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the same reason I believe it is not compatible with macOS and freebsd either