Can i move my dietpi install via DD

Hi, i would like to move my installation to an M2 ssd (from an external ssd).
can i just do a DD copy?
what is the exact command i need to use?
thanks,
Bar1

Hi,

better to have the drive not in use while cloning. Therefore it might be simplest to connect both drives to a computer and use tools like GParted to clone the old drive.