Create and restore a Backup of a complete data carrier
The best way to backup the Raspberry Pi is to create an image of the entire SD card.
This is best done with the tool dd (/dev/sdb is the volume to be backed up).
The command is as follows:
Restore the disk from the image with dd
First, clean up the destination drive:
Then play back the image: