I have had a failure in my SD card, but fortunately, I made a backup. However, I have no idea how to do the restore procedure.

My backup was created with the raspbiBackup.sh script, and produces four files: an img, a mbr, a sfdisk and a tar file. The sfdisk and mbr files are around 500 bytes each, whereas the img is 69MB and the tar is 1.68GB. Extracting the tar reveals that the contents contain the entire filestructure of the root drive as I remember it.

However, all of the online guides to restoring disk images I can find seem to start with the premise that the img file contains everything, and doesn't mention backup systems using other filetypes. As I recall, the Raspberry Pi disk is partitioned into a 'boot' partition, and a second one which contains all the files such as my programs and documents. My first attempts to get the SD card back up and running used the img file (69MB), and restored only the boot partition of the drive. This is a great first step, but I have no idea what I now need to do to restore the other 1.68GB of data that are contained in the tar file.

I presume that I need to create a partition and then dump the contents of the tar file into that partition. However, I recall that the partition ought to be of a specific filesystem type ('Linux'?), and probably needs a specific name as well. What should that name and type be, and how do I go about creating that partition? I am doing this on OSX, but can work both DiskUtil and the graphical Disk Utility ('Linux' doesn't appear as a filesystem in Disk Utility). Note that I don't have a second Raspbian-enabled computer from which to conduct the restore procedure.

Any guidance in how I might restore the original SD card contents, given that I have these four files at my disposal, would be greatly appreciated.

  • 2
    You unfortunately seem to have followed some unusual backup process, and have failed the first step of any backup (i.e. test the backup). Frankly I can't understand the "instructions" on the site. My guess is that the .img MAY have a disk image which could be installed by the normal install process. As you have not told us anything about what you are using it is difficult to say more.
    – Milliways
    Sep 19, 2016 at 11:58
  • If it is really only 68 MB the .img doesn't sound like it will serve much purpose at all.
    – goldilocks
    Sep 19, 2016 at 15:10
  • 1
    I can tell you how to restore the backup if you have a system capable of working with ext4 filesystems. If you don't, you'll have to decide whether that is a problem worth solving.
    – goldilocks
    Sep 19, 2016 at 15:13
  • @goldilocks I have ext4fuse installed on the Mac, which allows me to write ext4 filesystem partitions. Sep 21, 2016 at 9:56
  • 1
    See here and here. The first one talks about the structure of the root filesystem, the second about the the device images. I believe fdisk exists on OSX but it may not be exactly the same.
    – goldilocks
    Sep 21, 2016 at 12:36

2 Answers 2


By accident I detected this question. raspiBackup can also be be used to restore the backup created by raspiBackup (See https://www.linux-tips-and-tricks.de/en/restore). So I'm wondering why you're asking how to restore the backup. Anyhow - a main design principle of raspiBackup was it also should be possible to restore everything with just plain Linux tools.

raspiBackup saves the boot partition in an img. The root file system can be saved with dd, tar or rsync. So in order to manually restore the backup

1) you have to recreate the partition layout with the information available in sfdisk file

2) format the root partition

3) restore the img into the boot partition

4) restore the root partition with dd, tar or rsync

Hope this helps even my answer it's quite late :-)

I suggest to place all questions about raspiBackup on the website in a comment because that's monitored by me.

Update 11/5/2017: One user of raspiBackup manually restored a backup and described the steps in detail. See here for details

  • Thanks. The problem was that the Raspberry Pi is my only Linux machine - so I can't do the restore process from the Raspberry Pi whilst the SD card is corrupted. May 12, 2017 at 12:36
  • I see. But why don't you just setup another new raspbian image on a brand new SD card and use this system to restore the backup with raspiBackup?
    – framp
    May 13, 2017 at 14:47
  • That's an option, certainly, but involves buying a second SD card and setting up Raspbian again. Not impossible, but not the simplest solution for my situation is all. May 16, 2017 at 13:58

Here there is a way , not easier but a way if you are familiar with terminal :

link from raspberrypi.stackexchange

Your Answer

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

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