Pi Image Manager: Back Up a Running Raspberry Pi Without Shutting Down Your Ham Shack




If you're like me, Raspberry Pis have a way of multiplying around the ham shack.

What starts as a simple project eventually becomes a collection of little computers running everything from weather stations and remote radio interfaces to MQTT brokers, Node-RED dashboards, network monitoring and assorted ham radio applications.

They're inexpensive, consume very little power and can run for months without attention.
Until something goes wrong.

A failed microSD card, a corrupted filesystem or an failed software update can turn a perfectly functioning Raspberry Pi into a weekend recovery project.

I've been looking for a convenient way to back up my Raspberry Pis while they're still running, without shutting them down and removing their SD cards.  I also have 4-Rpis running remotely at sites between 50 and 150 miles away that I only backup when I am onsite which is very infrequently.

That led me to develop Pi Image Manager, a free, open-source macOS application that backs up Raspberry Pis over SSH.

The source code is now available on GitHub:

https://github.com/n3bkv/pi-image-manager

The Problem With Traditional Raspberry Pi Backups

The traditional approach is simple enough:

1. Shut down the Raspberry Pi
2. Remove its microSD card
3. Insert the card into another computer
4. Use a disk imaging utility to create a backup
5. Reinstall the card and restart the Pi

It works, but it's inconvenient if that Pi is handling an always-on service.

And if the Raspberry Pi is installed in an equipment rack, a remote enclosure or an awkward location, getting to the SD card can be a real pain.

There are utilities for backing up a running Raspberry Pi, including RonR's excellent image-backup tool. However, some approaches require enough free space on the Pi to create a temporary image before transferring it elsewhere.

That can be a problem when your SD card is already fairly full.

I wanted something that would stream the backup directly to my Mac without requiring a large temporary image on the Pi.

Introducing Pi Image Manager


Pi Image Manager is a native macOS application written in SwiftUI.

It communicates with the Raspberry Pi using SSH, collects the filesystem data and saves the backup directly to your Mac.

The application supports two backup methods.

1. Stream a Recovery Backup Directly to Your Mac

This is the method I find most useful.

Instead of creating a temporary .img file on the Raspberry Pi, the application streams compressed filesystem archives over SSH.

The recovery backup contains:
• root.tar.gz — the Raspberry Pi's root filesystem
• boot.tar.gz — the boot firmware partition
• disk-layout.txt — partition and disk information
• exclusions.txt — files and directories intentionally omitted
• README.txt — backup information
• SHA256SUMS — checksums for verifying file integrity

Everything is saved in a named recovery folder on your Mac.

The Pi continues running during the process.

Once the archives are complete, Pi Image Manager can use a Linux virtual machine on the Mac to reconstruct them into a Raspberry Pi .img file.

In other words, you can perform a backup without first creating a full disk image on the Raspberry Pi.

2. Create a Traditional Disk Image

Pi Image Manager also supports a conventional full-image backup using RonR's image-backup utility.

In this mode, the Raspberry Pi creates an image locally, checks its filesystems, and transfers it to your Mac.

This method requires sufficient temporary storage on the Pi but provides another option when a traditional image workflow is preferred.

Features I Wanted in a Backup Utility

As I worked on the application, I added several features that make it practical for managing multiple Raspberry Pis.

Multiple Raspberry Pi Profiles

You can save separate connection settings for each Pi, including its hostname or IP address, SSH username, backup destination and exclusion settings.

Backup Exclusions

Not every file needs to be included in a recovery image.

For example, there is usually little value in backing up old system journals, downloaded package caches, temporary files or large disposable directories.

Pi Image Manager includes common exclusion presets and allows you to specify additional directories.
You can also browse the Pi's directory structure and select directories to exclude.

Backup Preview

Before starting a backup, the application estimates how much data will be processed and shows the configured exclusions.

This is particularly helpful when a directory contains gigabytes of recordings, logs or other data that may already be backed up elsewhere.

Live Backup Status

While streaming, the interface displays progress, transfer speed, elapsed time and an estimated completion time.

There is also an Abort Backup control that stops the streaming operation and removes the incomplete recovery folder without deleting previously completed backups.

Custom Backup Names

You can name the recovery folder and resulting .img file so that backups are easier to organize.

Checksum Verification

The application generates and verifies SHA-256 checksums for the recovery archive files.

That helps detect incomplete or corrupted transfers, although checksum verification alone does not establish that the backup is a consistent or bootable system.

How It Works

The streaming workflow is straightforward:

 Raspberry Pi
 (running normally)
       |
       | SSH
       |
       v
     Mac
       |
       +-- Compressed recovery archives
       |       |
       |       +-- root.tar.gz
       |       +-- boot.tar.gz
       |       +-- disk-layout.txt
       |       +-- SHA256SUMS
       |
       +-- Optional image conversion
               |
               v
          Lima Linux VM
               |
               v
        Raspberry Pi .img
               |
               v
         Write to SD card

The interesting part is that the Mac handles the archive storage and image reconstruction.

The Pi doesn't need enough free space for a complete temporary image when using the streaming method.

Getting Started

Pi Image Manager v0.2.2 requires:

• A Mac running macOS 13 or later, with Apple's command-line development tools
• A Raspberry Pi running a compatible 64-bit Raspberry Pi OS or Debian-based Linux installation
• SSH access from the Mac to the Raspberry Pi
• SSH key-based authentication
• Enough free space on the Mac for the backup
• Lima, if you want to convert recovery archives into .img files

The image converter currently targets Raspberry Pis using a conventional FAT boot partition and ext4 root filesystem.

Step 1 — Download the Project

On your Mac, open Terminal:

git clone https://github.com/n3bkv/pi-image-manager.git
cd pi-image-manager

The repository includes the Mac application, the Raspberry Pi helper, setup instructions, and test scripts.

Step 2 — Configure SSH

Pi Image Manager uses SSH key authentication.

If you can connect to your Pi using a password, you're partway there. You'll need to configure an SSH key so the application can connect without an interactive password prompt.

The GitHub README provides the complete process, including how to enable SSH, generate keys and verify the connection.

Step 3 — Install the Raspberry Pi Helper

From your Mac, copy the helper to the Pi:

scp -r PiHelper pi@raspberrypi.local:~/PiHelper-v020

Connect to the Pi:

ssh pi@raspberrypi.local

Then install the helper:

cd ~/PiHelper-v020
sudo ./install-pi.sh pi

Verify installation:

sudo -n /usr/local/sbin/pi-image-helper status

Replace the username and hostname/IP with those appropriate for your system.

The installation configures limited passwordless sudo access for the helper executable, rather than unrestricted passwordless administrator access. 

Step 4 — Build the Mac Application

Back on your Mac:

cd pi-image-manager/MacApp
./build-mac.sh

The build script creates the application in the build directory.

Because this is an open-source project distributed as source code, the resulting application is not Apple-notarized.

Step 5 — Install Lima for Image Conversion


If you want to convert recovery archives into .img files, install Lima:

brew install lima

Lima provides the Linux environment used to construct the boot and root partitions.

On Apple Silicon Macs, make sure you're using the native ARM version of Homebrew, normally installed under /opt/homebrew.

Step 6 — Back Up Your Raspberry Pi

Launch Pi Image Manager and create a profile for your Pi.

Enter the hostname or IP address, SSH username, and Mac backup destination.

Select any exclusions, preview the estimated data, and choose either Stream Backup Only or Stream Backup + Create .img.

The application handles the transfer, shows progress, and verifies the resulting recovery archives.

My Experience Testing It


I tested the v0.2.2 Mac application against my Raspberry Pi setup.

The streaming backup completed successfully, and I was able to use the resulting archives to generate a Raspberry Pi .img file on the Mac. I then wrote the resulting .img to a spare SD card and actually booted a Pi from it.

That verified the backup and image generation workflow in my environment.

That is a recovery test and it's worth doing before relying on any backup solution.

Important Limitations of Live Backups


There's an important distinction between backing up a running filesystem and making a consistent point-in-time snapshot.

Pi Image Manager performs a live, file-based backup.

That means files can change while the backup is underway.

For ordinary configuration files, scripts, and relatively static application data, this may not be a major issue. But database servers and constantly changing application files deserve special attention.

For example, a Raspberry Pi running MariaDB, PostgreSQL or InfluxDB may need a database-native backup or snapshot procedure to ensure consistent data.

The streaming process detects certain files that change during archiving and treats those as errors rather than silently reporting success. However, it cannot guarantee application-level consistency.

My recommendation is to use Pi Image Manager as one component of your backup strategy and not as a substitute for testing restores and protecting important databases.

And don't overwrite your only known-good backup with a newer one until you're satisfied it can be restored.

Why This Matters for Ham Radio

Raspberry Pis are increasingly part of the infrastructure around amateur radio.

They're useful for everything from remote station control and SDR support to APRS, packet systems, digital-mode interfaces, weather monitoring, and network automation.

Many of these systems involve hours of configuration and experimentation.

The real value isn't necessarily the Raspberry Pi hardware. It's the collection of software, settings, scripts, dependencies and little fixes that make the system work exactly the way you want.

A practical backup tool can make recovery considerably easier after you encounter a corrupted or dead SD card. Over time it will happen, as the cards have a limited write lifespan.

Open Source and What's Next

Pi Image Manager is available under the MIT license.

Version 0.2.2 is focused on macOS. The repository includes the native Mac application and the Raspberry Pi helper.

Some ideas for future development include Windows and Linux support through Docker, additional image-conversion options and further improvements to the recovery workflow.
For now, I'd rather have a straightforward Mac version that I've tested than rush out additional platforms.
If you use Raspberry Pis in your station, you're welcome to explore the project, inspect the source and suggest improvements.

GitHub: n3bkv/pi-image-manager

The repository includes installation instructions, SSH setup, supported configurations and important recovery limitations.

The Bottom Line

Raspberry Pis are wonderful little computers but the more important they become to your station, the more important it is to have a recovery plan.

Pi Image Manager was created to make backing them up less of a chore.

And if it saves even one weekend rebuilding a perfectly configured Raspberry Pi, I'd consider that a pretty good win.

73,
Dave




 

Comments

Popular posts from this blog

How to Put Your AllStar Node on 44Net Connect

ShackClock 1.0 An All-in-One Ham Radio Shack Dashboard

Why You Might Want To Set Up Your Raspberry Pi Internet Web Server on 44Net

Build a Central N3FJP Field Day Log Server With Local DHCP and GPS Time

Building a Secure Web Portal on 44Net Without VPN Headaches

Getting WaveNode Power Meter Data Into Node-RED

How To Set Up Your Own Remote Station

How To Get Precise Time Outside Your Shack

Turning Your Starlink Mini into a Real Telemetry Device - How to bridge Starlink Mini into MQTT and Node-RED for real-time monitoring and automation

Bridging WaveNode Power Meter Data into Thetis

Ham RSS News Feeds

Amateur Radio Daily

ARRL News

Zero Retries