0

I have a Raspberry Pi 3B+ that I use for random tinkering projects.

What would be the correct way of backing up the entire "state" of the Pi, including any downloads, apps, scripts, settings, etc? Assume that only the SD card is used, not any other storage media.

The ideal outcome is that I can flash an entirely different project's image to the SD card, tinker with that, then go back to flashing the original SD card with all the settings / scripts / apps.

What's the best way to do this backup, and how do I flash the original file back to the SD card when I'm ready? Or is my only option simply buying an SD card for every "project"?

I'm currently using Raspbian but will probably use other OS's depending on the project I'm working on.

I found a similar question but that was asked 6 years ago, and was too advanced for me - I'm a beginner.

6
  • "Assume that only the SD card is used, not any other storage media" so where do you intend to store this backup?
    – Milliways
    May 17, 2020 at 9:43
  • Sorry, should have been more clear. What I meant was: assuming the current Pi system does not have any external storage that needs to be backed up. Only need to back up the SD card, for example on an external HDD or on my PC.
    – Pieter
    May 17, 2020 at 10:11
  • 1
    Does this answer your question? How to Backup/Shrink the image of my working Raspbian SD Card
    – Milliways
    May 17, 2020 at 10:32
  • I'm not sure, I'm not at all concerned with the size of the backup. I just want to be able to pick up an old project where I left off, including all settings etc, without needing separate SD cards for each project.
    – Pieter
    May 17, 2020 at 10:40
  • it really depends - is it a windows PC? unfortunately etcher and the raspberry pi's flasher (the two most popular flashers on windows) don't have a read function like win32diskimager - for some reason that utility has fallen out of favour May 17, 2020 at 11:43

2 Answers 2

3

@Dougie's answer will likely suit you best, but there are other solutions. One that has worked for me, and seems to have appeal for many others is called image-backup. Image-backup "creates a backup of a running Raspbian system to a standard 'raw' image file that can be written to an SD card". Here's why it might be better in some situations:

  • The backup is output to a file, not an SD card
  • It can do incremental backups (hourly, daily, on-demand, etc)
  • It does its backup job while the RPi is running

Note that it is invoked through the CLI, rather than the GUI.

1
  • That sounds like it will do the job! I could try to have that backup made to an external network drive, so I don't have to mess around with multiple SD cards. Thanks!
    – Pieter
    May 18, 2020 at 3:17
5

Best option is a complete clone of your SDCard as a bootable backup.

There's a tool in Raspbian to do that, all you need is a USB reader and a second SDCard that's the same size or bigger than your current SDCard.

SD Card Copier Tool

1
  • 1
    Thanks Dougie, will give that a try if the other solution doesn't work.
    – Pieter
    May 18, 2020 at 3:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.