I need to clone the sd card of an RPi4 to reduce the size of SD card and to serve as a backup.
The Rpi4 is headless and uses Raspbian Buster Lite so there is no gui SD Card Copier available.
After searching a bit I found this thread whic is a bit old but I restarted it not realizing it was located in a corner of the forum with low traffic...
Here is a link to this thread:
Old thread about sd card cloning
I have successfully used a script found on github to copy the content of a 32GB disk to an 8GB one and it seems like all has been copiedf over, but the RPi won't boot off of this copy.
There must be something simple I have missed...
If someone here has experience in cloning a headless RPi SD card from an SSH terminal, then please advice what I should correct.