I installed Arch-Linux-ARM on a 128GB SD-card for my Raspberry Pi. Now I want to make a backup.

There is less than 1.5GB of data on the SD card and if I want to make an image with DD, DD wants to read the entire card and make a 128GB backup.

How do I get DD to backup only the relevant 1.5GB?

I also have a 16GB SD-card and would like to restore the backup.img to this card or any other SD-card.

The Arch Linux is installed on the SD-card in two partitions, this should also be backed up so that I can copy a functioning system to any data carrier.

  • There are several solutions here raspberrypi.stackexchange.com/questions/311/… Also check the related questions in the sidebar for additional solutions. Commented Aug 26, 2020 at 18:08
  • This douse not answer my question. iI run dd if=/sdb of=/home/USER/arch-rbp.img DD makes a 128GB image, on the SD card is 1.5GB data.
    – Teso
    Commented Aug 26, 2020 at 18:25
  • 2
    dd does not operate at a filesystem level. It copies devices at a block level (below the filesystem level). But this also means it has no awareness as to whether space is free vs. used. If backup integrity and space efficiency is the priority, you might update the question to "How to create a space-efficient backup?" Commented Aug 26, 2020 at 20:55
  • How do I get DD to backup only the relevant 1.5GB? ... you don't ... your question is like how do i hold my breath for 5 hours?
    – jsotola
    Commented Aug 27, 2020 at 0:24
  • I think I will buy a 4GB SD card and install Arch on it, make a backup and then I can copy this backup to other media. And yes, the post raspberrypi.stackexchange.com/questions/311/… showed me new opportunities, thank you very much... ssh root@raspberrypi dd if=/dev/mmcblk0 | gzip -c > img.gz nice!
    – Teso
    Commented Aug 27, 2020 at 7:50


Browse other questions tagged or ask your own question.