raspiBackup can be used to restore a backup to it's original device configuration. There exist 3 configurations:
1) /boot and / on SD card
2) /boot on SD card and / external on a SSD, USB disk or USB flash drive (Raspi2 which doesn't support USB boot mode)
3) /boot and / on SSD, USB disk or USB flash drive (USB boot mode on Raspi3 or Raspi4)
raspiBackup can be used to migrate easily from (1) to (2) or (3).
Just create a backup with raspiBackup and restore this backup to the new device configuration:
For (2) use following command to restore the backup:
sudo raspiBackup.sh -d <SD card> -R <USB device> <backup>
For (3) use following command to restore the backup:
sudo raspiBackup.sh -d <USB device> <backup>
<USB device> can be SSD, USB disk or USB flash drive
If a large USB device is used option --resizeRootFS- may be useful to disable automatic expansion of the root partition. Then you can use the additional space for additional partitions.
For details about restore see here.