I recently had to move TrueNAS SCALE to a new drive due to a failing boot drive. The "backup current config and restore on fresh install" process worked like a charm for me. It successfully transferred over every customization I made since install (users, services, BB backup, network bridge, VMs, scrub schedules, etc). I suspect anything you customize outside of the TrueNAS GUI would not transfer over (manually set cron jobs, third party packages, etc.). I'm basing these instructions on TrueNAS-SCALE-22.12.3.3. Caveat emptor, I'm still somewhat of a novice and TrueNAS can be finicky.
- Navigate to Settings-->General in the TrueNAS GUI
- Click Manage Configuration-->Download File
- I chose the "Export Password Secret Seed" option
- Power off system and unplug old drive
- Install TrueNAS to the new M.2 drive
- On first boot after install, navigate once again to General Settings
- This time, click Configuration-->Upload File
- Follow the prompts, reboot, and enjoy
For me this process was
significantly easier than screwing around with disk imaging/cloning tools. Keep the old drive with original install handy just in case things go weird. Oh, and treat the downloaded config file like you would any other secrets like passwords, SSH keys, etc. The file contains passwords for any users you have configured, amongst other sensitive things.