I tried this backup script described in another question
"A working script from the Raspberry Community made by a member there", it runs with "pv" and "dd", but I was not able to properly restore it on another SD-card.

Is there a description how to restore it?

Best regards, Maverick


1 Answer 1


I haven't used that script1, but it looks like it duplicates both partitions into an .img file, then tar & gzips that. To extract the .img:

tar -xzf whatever.tar.gz

You can then mount and work with the partitions in the image following the instructions here. You can also use the .img to create an SD card following these instructions.

Note that you should not copy stuff from the second partition wholesale into a running system because: A) it will fail at certain points (/proc, /sys) -- hopefully; B) it will overwrite stuff in /run, /var, etc. that will likely screw up the system in very noticeable ways.

1. Because my answer to that question makes more sense ;) Once implemented, it's faster, easier, and safer (since if you use that backup image the wrong way, you will screw up your system as explained above). I explain other reasons there why dd is NOT a good tool for the purpose of maintaining a backup. I also explain how to restore from a (proper) backup using rsync...

  • I could have searched for the link myself, I was trying to get the original questioner to provide some details so that someone could answer his question. Your suggestion about rsync seems sensible, but is too complex for most beginners - who tend to be those who ask these questions. In fact the posted script below is misleading, as it is just a more complex way of running dd. In fact I "backup" my Pi using dd (and a script of my own) on another machine. If I need to go back it is just a case of mounting the image and copying needed files.
    – Milliways
    Jan 22, 2014 at 0:45
  • @Milliways : I can't see that answer as "too complex" for a beginner; it's just plain not complex. I don't quite explain every detail, true -- I refer to globs and mount points without defining them -- but these can easily be looked up or asked about, and they are things so elementary that if you are a beginner of some sort, you're going to have to learn what they refer to soon if you are going to learn anything at all. Someone who can't or won't learn anything is unlikely to have wanted a pi in the first place...
    – goldilocks
    Jan 22, 2014 at 13:34

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.