The upgrade is registered with the device and the product key is stored on Microsoft Servers.
So all you need to do is reinstall on a new storage device.
Will users who take advantage of the upgrade offer for Windows 10 from Windows 8.1 and Windows 7 also be able to obtain recovery media?
Microsoft recently noted the following options available:
With Windows 10, you can create your own recovery media and back up the pristine state of the operating system and preinstalled software. If things go wrong and you are unable to refresh or reset your device successfully, you
can boot the device using recovery media and reset to the prior pristine state.