Securing your printer.cfg
KGB automatically backs up your klipper config to GitHub. All you have to do is configure it through the UI, run the installer and you're done.
Create a GitHub account and create a new repo.
-
Step 1:
Make sure you have
git
installed:sudo apt-get install git -y
-
Step 2:
Download KGB:
cd ~ && git clone https://github.com/Low-Frequency/Klipper-Git-Backup.git
-
Step 3:
Start KGB:
chmod +x ~/Klipper-Git-Backup/*.sh && ./Klipper-Git-Backup/kgb.sh
-
Step 4:
You should now be in the main menu:
Choose what you want to do by entering the numer of the displayed action into the prompt. You should at least configure your GitHub Username, your Mail, one repository and one config folder before the install.
This script runs when your Pi starts, or if configured on a set timeschedule. It waits for network connection and then pushes a backup to your specified locations. Every action is logged. This way you always know what fails, or has failed in the past.
It even has log rotation implemented, so it doesn't eat up the precious space for your gcodes 😉
The setup script tells you to copy a private key and add it to your GitHub account. To do this just navigate to your profile -> settings -> SSH and GPG keys, add a new key and paste the copied key.
Big thanks to KIAUH for the inspiration for the UI.