Restore from 16 FreePBX 17

,

Hello,

I restored a backup from FreePBX 16 to FreePBX 17.

I have two issues:

  1. I cannot restore outbound routes. At least it throws an error there:
Restoring from core [FreePBX\modules\Core\Restore]
Processing Ampusers
Started restoring mysql dumps of : Ampusers
The restore process may require some time, with the current default timeout set to 10 hours
Completed restoring mysql dumps of : Ampusers
Processing Dahdichannels
Started restoring mysql dumps of : Dahdichannels
The restore process may require some time, with the current default timeout set to 10 hours
Completed restoring mysql dumps of : Dahdichannels
Processing Trunks
Started restoring mysql dumps of : Trunks
The restore process may require some time, with the current default timeout set to 10 hours
Completed restoring mysql dumps of : Trunks
Processing Did
Started restoring mysql dumps of : Did
The restore process may require some time, with the current default timeout set to 10 hours
Completed restoring mysql dumps of : Did
Processing Devices
Started restoring mysql dumps of : Devices
The restore process may require some time, with the current default timeout set to 10 hours
Completed restoring mysql dumps of : Devices
Processing Users
Started restoring mysql dumps of : Users
The restore process may require some time, with the current default timeout set to 10 hours
Completed restoring mysql dumps of : Users
Processing Routing
Started restoring mysql dumps of : Routing
The restore process may require some time, with the current default timeout set to 10 hours
Completed restoring mysql dumps of : Routing
Invalid sequence order: 2 on line 135 of file /var/www/html/admin/modules/core/Components/Outboundrouting.php
#0 /var/www/html/admin/modules/core/Components/Outboundrouting.php(61): FreePBX\modules\Core\Components\Outboundrouting->setOrder()
#1 /var/www/html/admin/modules/core/Restore/Routing.php(17): FreePBX\modules\Core\Components\Outboundrouting->editById()
#2 /var/www/html/admin/modules/core/Restore.php(58): FreePBX\modules\Core\Restore\Routing->setConfigs()
#3 /var/www/html/admin/modules/backup/Handlers/Restore/Common.php(139): FreePBX\modules\Core\Restore->runRestore()
#4 /var/www/html/admin/modules/backup/Handlers/Restore/Common.php(127): FreePBX\modules\Backup\Handlers\Restore\Common->runRestore()
#5 /var/www/html/admin/modules/backup/Handlers/Restore/Multiple.php(70): FreePBX\modules\Backup\Handlers\Restore\Common->processModule()
#6 /var/www/html/admin/modules/backup/Console/Backup.class.php(378): FreePBX\modules\Backup\Handlers\Restore\Multiple->process()
#7 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php(312): FreePBX\Console\Command\Backup->execute()
#8 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(1022): Symfony\Component\Console\Command\Command->run()
#9 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand()
#10 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun()
#11 /var/lib/asterisk/bin/fwconsole(163): Symfony\Component\Console\Application->run()
#12 {main}
Restore processing for modules are finished successfully

And then:

Reloading...... DONE
Running Post Restore Hooks.. Please note that hook will restart httpd service so please refresh your page (using new ports)
Running Post Restore Hooks DONE
Finished
There were errors during the restore process
        Invalid sequence order: 2 on line 135 of file /var/www/html/admin/modules/core/Components/Outboundrouting.php
  1. I keep on seeing the below in the Asterisk logs
[2026-06-17 18:29:12] WARNING[2097] res_odbc.c: SQL Execute returned an error: 22001: [ma-3.1.15][10.11.14-MariaDB-0+deb12u2]Data too long for column 'uniqueid' at row 1
[2026-06-17 18:29:12] WARNING[2097] res_odbc.c: SQL Execute error -1!
[2026-06-17 18:29:12] WARNING[2097] cdr_adaptive_odbc.c: cdr_adaptive_odbc: Insert failed on 'asteriskcdrdb:cdr'.  CDR failed: INSERT INTO cdr (calldate, clid, src, dst, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, uniqueid, linkedid, sequence) VALUES ({ ts '2026-06-17 18:28:49' }, '"CID NAME" <8884441234>', '8884441234', '8884441234', 'from-internal', 'Local/8884441234@from-internal-0000000a;1', 'WebSocket/INCOMING/0x7ff9d4013fe0', 'Stasis', 'summer-project', 7, 3, 'ANSWERED', 3, 'sp-7474de19-d5e4-4ccb-8a60-813f8ca552e1', 'sp-7474de19-d5e4-4ccb-8a60-813f8ca552e1', 63)

Please let me know if you have any questions

Thank you

Pretty sure you’re running into the same issue discussed in this thread. You should be able to force a module upgrade on core to a version without the problem.