# Rpi-image-cloner — Automated Raspberry Pi SD card backup tool (Docker / Portainer)

**URL:** <https://community.openhab.org/t/rpi-image-cloner-automated-raspberry-pi-sd-card-backup-tool-docker-portainer/170704>\
**Category:** Server\
**Tags:** raspberry, backup, backup-discussion, sd-backup, restore-backup\
**Created:** [October 17, 2026, 4:24pm UTC](https://community.openhab.org/t/rpi-image-cloner-automated-raspberry-pi-sd-card-backup-tool-docker-portainer/170704 "2026-10-17T16:24:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierrecity](https://community.openhab.org/user_avatar/community.openhab.org/pierrecity/32/65299_2.png) [@pierrecity](https://community.openhab.org/u/pierrecity)\
**Post date:** [October 17, 2026, 4:24pm UTC](https://community.openhab.org/t/rpi-image-cloner-automated-raspberry-pi-sd-card-backup-tool-docker-portainer/170704/1 "2026-10-17T16:24:34Z")

</div>

**rpi-image-cloner — Automated Raspberry Pi SD card backup tool (Docker / Portainer)**

If you’re running openHAB on a Raspberry Pi 24/7, losing your SD card means losing everything — configs, rules, persistence data. I built a small self-hosted web tool to automate SD card backups via SSH.

 ![Cloner_Screenshot 2026-10-17 175601](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/4/4/4499fb6f3656dbfd737a262490ff811ebac5be16.png)

**How it works:**  
You insert a backup SD card into the Pi (via USB adapter), and the tool SSHs in, runs `rpi-clone`, and automatically fixes `cmdline.txt` and `fstab` with the correct PARTUUID — so the backup card boots directly without any manual steps.

**Features:**

- Web UI to manage multiple Raspberry Pis
- Weekly automated schedules (cron-based)
- Live progress display during backup
- Boot partition auto-fix after every clone
- SSH keepalive — works reliably even for large backups (2+ hours)
- Encrypted SSH credentials
- Docker / Portainer ready

**Stack:** Python · FastAPI · Paramiko · APScheduler · SQLite · Docker

**Requirements on the Pi:**

- SSH enabled
- `rpi-clone` installed
- A backup SD card connected via USB adapter

**GitHub:** [GitHub - pierrecinema/rpi-image-cloner: Web-based Raspberry Pi SD card backup tool via SSH — with auto boot-fix, weekly schedules and Docker support · GitHub](https://github.com/pierrecinema/rpi-image-cloner)

Full setup guide with step-by-step instructions is in the README. Happy to answer questions!

---

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [October 17, 2026, 4:30pm UTC](https://community.openhab.org/t/rpi-image-cloner-automated-raspberry-pi-sd-card-backup-tool-docker-portainer/170704/2 "2026-10-17T16:30:07Z")

</div>

Are you aware that the SD mirroring functionality has been available in openHABian in a long time?

---

<div class="post-metadata">

**Author:** ![pierrecity](https://community.openhab.org/user_avatar/community.openhab.org/pierrecity/32/65299_2.png) [@pierrecity](https://community.openhab.org/u/pierrecity)\
**Post date:** [October 17, 2026, 8:10pm UTC](https://community.openhab.org/t/rpi-image-cloner-automated-raspberry-pi-sd-card-backup-tool-docker-portainer/170704/3 "2026-10-17T20:10:30Z")

</div>

Yes, but that’s not openhabian, that’s openhab on Docker. It’s not just for openhab, it works with any Raspberry Pi.

PS make a complete image clone

---

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [October 17, 2026, 8:38pm UTC](https://community.openhab.org/t/rpi-image-cloner-automated-raspberry-pi-sd-card-backup-tool-docker-portainer/170704/4 "2026-10-17T20:38:59Z")

</div>

Well it’s openHAB on Docker _on Raspberry Pi_ and I wonder why one should stack stacks like that - you don’t need or benefit from Docker in that case, it’s even harmful and just adding overhead.  
No good idea on a lowmem hardware in fact.  
The openHABian SD mirroring feature also creates a bootable image of the whole box, i.e. it’s also applicable if you install additional stuff beyond openHAB (no matter if you use containers).  
And it’s fully automated and minimizes downtime: in case of SD failure, you just need someone to swap cards and restart your box. No need to have PC access to restore the backup right the moment you’re in trouble.  
And really anyone like your mom or neighbour can handle that - very handy in remote locations.

---

<div class="post-metadata">

**Author:** ![pierrecity](https://community.openhab.org/user_avatar/community.openhab.org/pierrecity/32/65299_2.png) [@pierrecity](https://community.openhab.org/u/pierrecity)\
**Post date:** [October 17, 2026, 8:52pm UTC](https://community.openhab.org/t/rpi-image-cloner-automated-raspberry-pi-sd-card-backup-tool-docker-portainer/170704/5 "2026-10-17T20:52:56Z")

</div>

Yes, but openHAB requires a separate Raspberry Pi. Many applications run very stably on my Docker container. With my tool, you don’t need a PC to perform the backup, as it uses the Raspberry Pi’s USB port. Just swap the SD cards.
