Making a backup of the SD card of your Raspberry Pi typically involves powering down the system, taking out the card, putting it into a card reader on your regular computer, and then entering the commands for backing up the disk.
However, if your Raspberry Pi is built into a device like a digital picture frame and it is difficult to access because you have to take it down from the wall, unplug the power, and try to remove the SD card with freshly clipped fingernails, then you just don’t do it often, if at all.
This is where hot-cloning comes into play. Hot-cloning lets you make a fully bootable copy of a remotely running system. This means you can back up, e.g., the SD card of your digital picture frame, which is operational 24/7, to your regular computer.
You can even automate it to make it happen in the background once a week and keep only the last three backups.
In this article, I will explain to you step by step how to set up hot-cloning using a compression algorithm, restore an image, and automate this task.
I will also explain some limitations of database-intensive applications where hot-cloning may not be the best choice.
Tested with Raspberry Pi OS Bookworm (December 2024) and with macOS on the receiving end.
Why not backing up your SD card is not an option
The SD card and the power supply of your Raspberry Pi are likely the only components that may break.
I’ve seen SD cards in a daily operation lasting five years; others break after a few months.
If the power supply dwindles, you get a new one.
But if the SD card fails, you either have a saved image of the SD card that you flash on your replacement card, or you go through the more or less tedious routine of reinstalling everything from scratch.
Sometimes, you may have made modifications you don’t remember or are difficult to recreate.
Save yourself the trouble and make regular back-ups. It’s painless if you follow my instructions below.
Why hot-cloning can introduce discipline in the backing-up process
Whenever the word “hot” is used in software, it refers to an operation conducted while the computer system is running. Think of hot-plugging or hot-swapping of external drives to avoid any system downtime.
Even if a digital picture frame is not a mission-critical tool, having a near-current backup image of your SD card is good practice.
If it’s easy and automatic to back up your card, you will do it. If it’s hard, you will not, even if you swear otherwise.
When you clone the SD card of your Raspberry Pi, you must save the resulting image to another computer as your SD card will fill up to the last byte, and the saved image will be almost as large as your entire SD card.
How to save the cloned image directly on your regular computer
Open a Terminal window on your regular computer.
Enter the following command and replace “pi@192.168.178.81” with the user name and IP of your remote Raspberry Pi.
ssh pi@192.168.178.81 "sudo dd if=/dev/mmcblk0 bs=1M status=progress | gzip -" > ~/Desktop/$(date +%Y%m%d_%H%M%S)_pi_clone.gz
The backup file will now appear on the Desktop of your regular computer where you started this command.
It will take some time to finish, but you will see a regular status update. It’s both a question of your hardware and the network speed.
63851986944 bytes (64 GB, 59 GiB) copied, 1652 s, 38.7 MB/s
The saved file will be compressed right away during the cloning process.
How to restore a hot-cloned image
You must remove and put the SD card into a card reader to restore an image. There is no way to restore remotely. It would expose your Raspberry Pi to a high-security risk. But the backup is only on rainy days; hopefully, you will never have to use it.
Following your first backup, you should make a test restore onto a separate SD card.
I recommend using a tool like ApplePi Baker (macOS) or Balena Etcher (macOS, Windows, or Linux) for this task. Run a full restore on a spare SD card and insert it into your Raspberry Pi for testing.

It is much more comfortable with a user-friendly graphic interface rather than having to remember the Terminal commands.
I made some tests with the SD card that is in my digital picture frame, and the hot-cloned image worked as advertised.
Note: You must use an SD card that is at least the size of the card that you made the backup from. You can use a larger one. To expand to full size after re-cloning, enter sudo resize2fs /dev/mmcblk0p2
(Assuming mmcblk0p2
is the main data partition).
Limitations of hot cloning
Hot cloning may not work for every use case. However, if you can cut the power of your Pi without any damage and it boots up again without any issue, then the method described above should be fine.
But even with these limitations, hot-cloning may still be the more attractive option as your system can remain in service uninterrupted.
In the case of a digital picture frame, and if you use the software packages described in this blog, you should not encounter any issues.
Conclusion
Hot-cloning, especially when tied into an automated process, is an effortless way to ensure you always have a current SD card image of your Raspberry Pi applications.
No more excuses for not regularly doing backups!
Have you found an even better way? Let me know!
Was this article helpful?
Thank you for your support and motivation.
Related Articles
- How to back up and restore your Raspberry Pi SD Card with ApplePi Baker for macOS Catalina
- Which SD card is best for a Raspberry Pi?
- How to adjust the default time setting of PictureFrame in Home Assistant
- Create your own digital picture frame access point when WiFi is unavailable (2025 Bookworm Edition)