You can use the PrestaShop official upgrade module. I have tested it. It properly upgrades PS 1.7 to PS 8, or even 9.
I suggest upgrading to PS 8 first, and then to PS 9 instead of directly upgrading to PS 9.
https://addons.prestashop.com/en/data-transfer-backup/5496-update-assistant.html
Please...