On the old server, I cleaned up old voicemail and such, bringing the backup file to under 1GB, went to restore that file, this is the screen after the backup file upload.
I created a temp folder and un-tarred that file, this one shows both SQL files.
mysql-3.sql
mysql-4.sql
I realized that the file I checked earlier, was a 3rd attempt without the CDR because the CDR table is 1.9GB.
I run “Run Restore & Legacy CDR” and the result is below, as you can see a syntax error at the end.
At that point it thinks it’s done, apply changes, no data except CDR.
Running with: /usr/sbin/fwconsole backup --restore=‘/var/spool/asterisk/backup/uploads/20201124-104226-1606232546-2032888516.tgz’ --restorelegacycdr --transaction=‘1e40a712-cebf-4396-b9d6-e9d610b86aeb’
Determining backup file type…type is legacy
Legacy CDR Restore Option: 1
Starting restore job with file: /var/spool/asterisk/backup/uploads/20201124-104226-1606232546-2032888516.tgz
Extracting backup…
Loading manifest to memory
Loading astdb to memory
Parsing out SQL tables. This may take a moment depending on backup size.
Found 2 database files in the backup.
Legacy CDR Restore Opted. we are processing , It may take long time to process /tmp/backup/1e40a712-cebf-4396-b9d6-e9d610b86aeb/mysql-4.sql
Starting legacy cdr sql restore process
Please note that, legacy cdr sql restoration process may take a long time depends on cdr sql file size
Restore of legacy cdr sql process done…
Installing cdr
Adding index to did field…Adding index to did field in the cdr table
Done
Adding index to recordingfile field…Adding index to recordingfile field in the cdr table
Done
Checking if field cnum is present in cdr table…OK!
Checking if field cnam is present in cdr table…OK!
Checking if field outbound_cnum is present in cdr table…OK!
Checking if field outbound_cnam is present in cdr table…OK!
Checking if field dst_cnam is present in cdr table…OK!
Checking if field linkedid is present in cdr table…Adding!
Checking if field peeraccount is present in cdr table…Adding!
Checking if field sequence is present in cdr table…Adding!
OK!
Generating CSS…Done
Restored module cdr [FreePBX\modules\Backup\RestoreBase]
Installing cel
Creating cel if needed…OK
checking for extra field…not found
Checking for userfield field to remove…found
Checking for src field to remove…found
Checking for dst field to remove…found
Checking for channel field to remove…found
Checking for dstchannel field to remove…found
Checking for context index…found
Removing outdated fields (this might take a long time)Removed
Generating CSS…Done
Restored module cel [FreePBX\modules\Backup\RestoreBase]
File named: /tmp/backup/1e40a712-cebf-4396-b9d6-e9d610b86aeb/mysql-3.sql
Detected file /tmp/backup/1e40a712-cebf-4396-b9d6-e9d610b86aeb/mysql-3.sql as the PBX (Asterisk) database. Attempting restore
Loading supplied database file mysql-3
INSERT INTO bmh_names
VALUES (9306,200318,‘BURGOS,JUAN CARLOS’,‘’,‘415-254-1594’,‘’,‘’,‘415-554-1514’,‘8970 W ST APT # 204’,‘’,‘Charlston\’‘,‘FL’,‘43174’,’‘,’',‘5FNYF4H48BB045255’,2011,‘Z’,‘Y’,NULL,NULL,‘12/10/2012 0:00’,NULL);SQLSTATE[HY000]: General error: 1 near “FL”: syntax error