Klipper Backup and Restore Guide for Voron — Never Lose Your Config
Klipper Firmware Guide
Your Voron's configuration is the sum of hundreds of hours of tuning — pressure advance values dialed in filament by filament, input shaper resonance curves measured and saved, bed mesh profiles that compensate for every subtle warp in your build plate, and macros that automate your exact workflow. Losing that config to a corrupted SD card, a failed firmware update, or a misconfigured moonraker database is devastating. This guide covers every backup and restore strategy for a Klipper-based Voron, from quick manual saves to fully automated disaster recovery pipelines. Last updated: May 2025.
What You Need to Back Up
A Voron running Klipper has several distinct layers of configuration. Backing up just
printer.cfg is not enough for a full recovery. Here is everything that matters:
- printer.cfg — The most important file. Contains all stepper config, pin mappings, thermistor types, PID values, probe offsets, bed mesh settings, input shaper calibration, pressure advance, and all your custom macros. Losing this means rebuilding your entire printer config from scratch.
- moonraker.conf — Moonraker's configuration file includes authorization settings, update manager configuration, power control device mappings, and webcam settings. Without it, Fluidd and Mainsail may not connect properly.
-
Klipper firmware binaries — Each MCU on your Voron (main board, toolhead board, any
CAN bus nodes) has a
firmware.binorklipper.uf2file. If an MCU dies and needs replacement, you need to recompile firmware — unless you saved the binary. -
Macros and conditional includes — If you use
[include macros.cfg]or separate config files for different print modes, back those up too. Dynamic macros andsave_variablesJSON files store per-filament profiles. -
Moonraker database — Located at
~/.moonraker_database/, this SQLite database stores saved variables, timelapse config, history, and spool manager data. Moonraker automatically keeps anasidecopy that can be used for recovery. - Slicer profiles — Your OrcaSlicer or SuperSlicer profiles with Voron-specific presets (retraction, pressure advance, cooling, bed adhesion settings). Export your profiles periodically.
Method 1: Moonraker Backup Plugin (Recommended)
The moonraker-backup plugin is the most hands-off solution. It creates compressed archives of your entire config directory on a schedule you define and can push them to remote storage via SCP or rsync.
# In moonraker.conf — enable the backup module
[backup]
enable: True
# Archive the entire ~/printer_data/config directory daily at 3am
# via a cron job on the host:
# 0 3 * * * /home/pi/moonraker/scripts/backup.sh
To install the moonraker backup plugin manually:
cd ~/moonraker
git pull
./scripts/install-moonraker-backup.sh
# Edit /etc/cron.d/moonraker-backup to set schedule
# Backups land in ~/printer_data/backups/ by default
For off-site backups, add an rsync target in your cron job:
#!/bin/bash
# ~/printer_data/scripts/backup-to-nas.sh
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
mkdir -p ~/printer_data/backups
cd ~/printer_data
tar czf "backups/config-$TIMESTAMP.tar.gz" config/
rsync -avz --remove-source-files backups/ user@nas:/volume1/voron-backups/
Method 2: Git-Based Backup
Git-based versioning gives you the full power of change history — you can see exactly what you changed between prints, revert a bad tuning change, and maintain branches for different configurations. This is the preferred method for advanced users who want change tracking.
cd ~/printer_data/config
git init
git add .
git commit -m "Initial config baseline"
# Add a remote (GitHub private repo, or your own Git server)
git remote add origin git@github.com:yourusername/voron-config.git
git branch -M main
git push -u origin main
# Create a backup script with automatic commits
cat > ~/printer_data/scripts/git-backup.sh << 'EOF'
#!/bin/bash
cd ~/printer_data/config
git add -A
git commit -m "Auto-backup $(date +%Y-%m-%d_%H:%M:%S)"
git push origin main
EOF
chmod +x ~/printer_data/scripts/git-backup.sh
# Add to cron: */30 * * * * ~/printer_data/scripts/git-backup.sh
With git-based backup, tracking configuration changes is trivial:
# See what changed in the last backup
git diff HEAD~1 HEAD
# Show changes for a specific file over time
git log --oneline -p -- printer.cfg
# Revert a bad change
git revert HEAD
Method 3: Manual Backup via SCP/RSync/Samba
For users who prefer a simple, no-dependency approach, manual backup is the most straightforward. Connect to your Raspberry Pi from your desktop and copy files directly.
# From your desktop — copy entire config directory
scp -r pi@voron.local:~/printer_data/config/ ~/voron-backups/config-$(date +%Y%m%d)
# Using rsync (more efficient for repeated backups)
rsync -avz pi@voron.local:~/printer_data/config/ ~/voron-backups/
# Restore from backup
rsync -avz ~/voron-backups/config/ pi@voron.local:~/printer_data/config/
sudo service klipper restart
If you have Samba set up on the Pi, you can also map the config directory as a network drive on Windows or macOS and copy files through the file explorer. This is the least technical option but works well for quick manual saves before config changes.
Method 4: KIAUH Backup Feature
KIAUH (Klipper Installation And Update Helper) has a built-in backup and restore function that covers the entire Klipper ecosystem. If you used KIAUH to install Klipper, you can run:
cd ~/kiauh
./kiauh.sh
# Select 4) Advanced -> 9) Backup configuration
# KIAUH creates a timestamped archive of:
# ~/printer_data/config/
# ~/klipper/
# ~/moonraker/
# ~/klipper-screen/
# Restore via: 4) Advanced -> 10) Restore configuration
The KIAUH backup is comprehensive but manual — you need to run it intentionally. Combine it with one of the automated methods above for complete coverage.
Best Practices
A robust backup strategy for your Voron has two tiers:
- Automated daily backup to external storage — Use the moonraker backup plugin or a git-based cron job that pushes to a remote repository. This protects against SD card failure and accidental deletion. Set it up once and forget about it.
-
Manual backup before any config change — Before you edit printer.cfg, change a pin
mapping, update Klipper, or flash new firmware, run a quick backup. A good habit is:
cp printer.cfg printer.cfg.bakbefore editing.
Store at least one backup off-device. An SD card failure on the Pi takes out both your live config and any local backups. A NAS, a second Pi, or a private GitHub repository all count as off-device.
Disaster Recovery Scenarios
MCU Firmware Corruption
If your BTT Octopus, SKR Turbo, or Fysetc Spider stops responding (Klipper reports
mcu 'mcu': Unable to connect), the firmware may be corrupted. Recover by reflashing via
DFU mode:
# Put the board into DFU mode
# BTT Octopus v1.1: hold BOOT button, press RESET, release BOOT
# Check if detected:
lsusb | grep DFU
# Flash the firmware binary directly
cd ~/klipper
make flash FLASH_DEVICE=0483:df11
# If you saved firmware.bin, you can also copy it to an SD card,
# insert it into the board, and power cycle. The board will
# automatically flash from the SD card.
Moonraker Database Corruption
Moonraker automatically creates a backup file (moonraker.aside) before applying database
migrations. If the database becomes corrupted after a failed update:
sudo service moonraker stop
cp ~/.moonraker_database/moonraker.aside ~/.moonraker_database/moonraker.sqlite
sudo service moonraker start
If the aside file is also corrupted or missing, you can restore from your last full config backup. The
database will be rebuilt with saved variables from your save_variables.cfg include file.
SD Card Failure
The Raspberry Pi SD card is the single point of failure in most Voron builds. If it dies completely:
- Flash a fresh Raspberry Pi OS image to a new SD card
- Install Klipper, Moonraker, and Fluidd/Mainsail via KIAUH
- Restore
~/printer_data/config/from your off-device backup - Recompile and reflash firmware to each MCU from the restored config
- Restart Klipper and verify all axes home and heat correctly
MCU Replacement — Config Migration
Replacing a BTT Octopus with a different board (e.g., Octopus v1.1 to v1.2, or Octopus to Spider) means every pin name changes. The migration process:
# 1. Get the pinout diagram for the new board from the manufacturer
# 2. Map old pin names to new pin names in a spreadsheet
# Example migration: BTT Octopus v1.1 -> Fysetc Spider v2.2
# Octopus: PC0 (stepper X step) -> Spider: PF12 (stepper X step)
# 3. Update printer.cfg with new pin mappings
# 4. Update [mcu] serial path (serial/by-id changes per board)
# 5. Recompile Klipper firmware for the new MCU
# 6. Flash, restart, and test each axis individually
# Find the new serial path
ls -l /dev/serial/by-id/
# Example: usb-Klipper_stm32f446xx_12345-if00
Always keep a copy of your original MCU's Klipper firmware binary alongside your config — if you need to swap back to the original board temporarily, you can reflash without recompiling.
Full Backup Script Example
Here is a comprehensive backup script that covers everything — config directory, moonraker database, and firmware binaries — and pushes them to a remote server:
#!/bin/bash
# ~/printer_data/scripts/full-backup.sh
# Full Voron Klipper backup — config, database, firmware
BACKUP_DIR=~/printer_data/backups
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
BACKUP_FILE="$BACKUP_DIR/voron-full-$TIMESTAMP.tar.gz"
REMOTE_USER="backup"
REMOTE_HOST="192.168.1.100"
REMOTE_PATH="/volume1/voron-backups/"
mkdir -p "$BACKUP_DIR"
# 1. Archive config directory
# 2. Copy moonraker database (stop service first to ensure consistency)
sudo service moonraker stop
cp ~/.moonraker_database/moonraker.sqlite "$BACKUP_DIR/moonraker-$TIMESTAMP.sqlite"
sudo service moonraker start
# 3. Include firmware binaries if they exist
if [ -d ~/klipper/out ]; then
cp ~/klipper/out/klipper.bin "$BACKUP_DIR/firmware-main-$TIMESTAMP.bin"
fi
# 4. Create compressed archive
tar czf "$BACKUP_FILE" -C ~/printer_data config/ -C "$BACKUP_DIR" "moonraker-$TIMESTAMP.sqlite" --ignore-failed-read
# 5. Push to remote storage
rsync -avz "$BACKUP_FILE" "$REMOTE_USER@REMOTE_HOST:$REMOTE_PATH"
# 6. Clean up local copies older than 30 days
find "$BACKUP_DIR" -name "voron-full-*.tar.gz" -mtime +30 -delete
echo "Backup complete: $BACKUP_FILE"
echo "Pushed to $REMOTE_HOST:$REMOTE_PATH"
Make the script executable and schedule it in cron:
chmod +x ~/printer_data/scripts/full-backup.sh
# Add to crontab: 0 3 * * * ~/printer_data/scripts/full-backup.sh
Config Versioning with Git
For serious config management, git-based versioning is the gold standard. Beyond simple backup, it gives you the ability to:
-
Track every change — Every time you edit printer.cfg and commit, you have a permanent
record. Use descriptive commit messages like
"Tuned PA for Polymaker ASA: 0.045"or"Fixed Z endstop pin offset after board swap". - Create branches for experiments — Trying a new hotend? Branch your config, make changes, and if it doesn't work, switch back to main.
- Compare configs between printers — If you have multiple Vorons, git makes it easy to diff configs and spot differences in pin mappings or tuning values.
The git diff command is invaluable for debugging — if a print fails after a config change,
run git diff HEAD~1 HEAD to see exactly what you changed.
Restore Checklist
When disaster strikes, follow this checklist to get back up and running:
- Restore
~/printer_data/config/from backup - Restore moonraker database from backup or aside file
- Verify
[mcu]serial paths match the connected hardware - Reflash firmware to each MCU if the SD card or board was replaced
- Restart Klipper:
sudo service klipper restart - Restart Moonraker:
sudo service moonraker restart - Test each axis homes correctly
- Test bed heating and extruder heating
- Run a bed mesh calibration
- Print a calibration cube to verify config integrity
Backup discipline is what separates a frustrating rebuild from a five-minute restore. Pick one of the four methods above — the moonraker plugin for simplicity, or git for power users — and set it up today. Your future self, staring at a dead SD card at 2am, will thank you.