1

There are several questions like this but they are a bit old.

I have a pi zero running Raspbian. The pi is enclosed in a metal case (don't worry, it's vented) and I can only access the SD card by disassembling the case, which is tedious and impractical for routine backups.

I am using Mac OS and would like to backup the entire SD card over the local wifi. Of course I have found many pages on this topic, but I would like to hear from people who have been able to do this successfully. What tools and approach have you used?

Any experiences of success using recent versions of Raspbian are appreciated.

Thanks!

Mitch
  • 15
  • 6
  • 1
    Does this answer your question? [How to Backup/Shrink the image of my working Raspbian SD Card](https://raspberrypi.stackexchange.com/questions/103990/how-to-backup-shrink-the-image-of-my-working-raspbian-sd-card) – Milliways May 31 '21 at 23:55
  • "The _entire_ SD card"... You want a bit-copy of the card or all physical files on it? – Thorbjørn Ravn Andersen Jun 01 '21 at 09:56
  • @Milliways: Thanks for the link. It doesn't quite get me there. I think I'm missing the skills on folder sharing across the local newtwork – Mitch Jun 01 '21 at 17:46

1 Answers1

1

You can do this easily using image-utils. There's another answer here that shows the step-by-step directions. image-utils is available for download from here, or from this GitHub repo if you prefer that.

To save the backup on your Mac over the network, you will need to execute two additional steps:

  1. Create a SMB share on your Mac: This is off-topic here, but it's not difficult, and there are many how-tos available. Here's one from Apple, and this search term will yield many others.

  2. Mount the SMB share on your RPi. I think the easiest way to do that is via the CLI, creating an entry if /etc/fstab - similar to this, but adapted to your systems:

//YourMacNetworkName/NameOfShare /mnt/MyRPiZero/backup cifs rw,username=seamus,password=your_password,nofail,vers=1.0 0 0

Where /mnt/MyRPiZero/backup is the "mount point" for the share on your Mac. Use this as the destination for your backup image.

Seamus
  • 18,728
  • 2
  • 27
  • 57
  • I learned something from those links. Thanks. Perhaps I'm missing it, but these utilities seem to work for applications like copying an image to a USB storage device. Due to physical constraints with the case, I have only wifi access to the pi. My backup solution must place the backup image on my Mac wirelessly. – Mitch May 31 '21 at 20:21
  • @Mitch: Of course... I assumed you were familiar with creating shares on your Mac & how to mount them, but I've added those steps in an edit to my answer. Hopefully this is clear enough, but let us know if not & we'll try to fill in the gaps. And FWIW, this is how I do it, so I know it works. – Seamus Jun 01 '21 at 05:44
  • Thanks for the additional detail. It works! I had an inkling that the solution involved something like what you suggested. You saved me a lot of head scratching by ELI5. All the other answers I found were close but not quite tailored to my situation. The edits you provided make it a complete solution for my situation. – Mitch Jun 01 '21 at 17:43
  • @Mitch: Glad it helped. Please read [`What should I do when someone answers my question?`](https://raspberrypi.stackexchange.com/help/someone-answers) – Seamus Jun 01 '21 at 20:38