dd
isn't a good backup method for backing up a live system, but it sounds like you may be trying to back up an SD card that you've removed from the system. I don't know if you have a special reason for preferring to do back ups on SD cards after they've been removed from the RPi... To my way of thinking, a live system backup would always be preferable - but that's me :P
As a suggestion, I'd recommend you consider doing live system backups using the image-backup
utility instead of offline backups:
creates backup as an image file which can be mounted on RPi (useful following upgrading to a new version of the OS), and simplifies system restoration from backup.
it's fast (3-5 minutes for a complete system backup on RPi 4B to a network drive).
compact backup (does not waste space storing unused portions of SD card)
existing image files may be updated in a fraction of the time required for a complete system backup; e.g. following an apt upgrade
or other system revisions
This last feature in particular simplifies backup logistics; I've written a small script to automate updating my backups to reflect the latest configuration.
But as to your question:
The hdiutil
CLI tool is available in macOS for creating and manipulating image files, but AFAIK it isn't capable of working with an ext4
filesystem. But see man hdiutil
for the official word on that, or the online docs for the GUI version - Disk Utility
.