FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.19k stars 204 forks source link

Firebird 5 : gbak with -FIX_FSS_DATA NONE and -PAR (Firebird-5.0.0.1306-0-linux-x64.tar.gz) #8095

Open mmoo-Leon-Sanders opened 3 weeks ago

mmoo-Leon-Sanders commented 3 weeks ago

I'm unable to restore a database if it contains -FIX_FSS_DATA Errors whilst using a backup with -PAR This DB contains an implicit error in one table.

Following fails: /opt/firebird/bin/gbak -b -se %IP%:service_mgr -user %USER% -pass %PASS% -T %DB% -PAR 16 -V /tmp/dailybackup.fbk /opt/firebird/bin/gbak -rep -se %IP%:service_mgr -user %USER% -pass %PASS% -V -P 8192 -FIX_FSS_DATA NONE -i /tmp/dailybackup.fbk dailyrestore --- The backup works however the restore fails and raises an error to fix the fss_data

Following works: Just removing the -PAR 16 in the backup the database is successfully backed-up and restored (with and without indexes -i).

backup gbak: 345.709 0.000 0 0 writing referential constraints gbak: 345.709 0.000 0 0 writing check constraints gbak: 345.713 0.003 2 0 writing SQL roles gbak: 345.718 0.005 0 0 writing names mapping gbak: 345.719 0.000 0 0 writing publications gbak: 346.749 1.030 0 0 closing file, committing, and finishing. 4179507200 bytes written gbak: 346.750 0.000 8011603 537935 total statistics

Restore just crashes gbak: 471.878 0.200 0 0 400000 records restored gbak: 472.017 0.139 0 0 410000 records restored gbak: 472.854 0.837 0 0 420000 records restored gbak: 473.036 0.181 0 0 430000 records restored gbak: 473.509 0.472 0 203 440000 records restored gbak: 473.811 0.302 0 136 445000 records restored

From what I can gather using -PAR changes the backup file in a way that -FIX_FSS_DATA NONE will not work when restoring it.

hvlad commented 3 weeks ago

Could you try with latest snapshot build ? Could you provide core dump of crash, or stack backtrace from it ?

aafemt commented 3 weeks ago

Just a side note: -FIX_FSS_DATA NONE is a complete nonsense, I hope you used it for example only.

mmoo-Leon-Sanders commented 3 weeks ago

Just a side note: -FIX_FSS_DATA NONE is a complete nonsense, I hope you used it for example only.

Sorry for the confusion. I tried to restore and it errored out with malformed UNICODE_FSS so I reran the restore with the param to fix the UNICODE to NONE. This worked and fixed the restore, but only when the backup was created without -PAR

gbak:restore options are: -FIX_FSS_D(ATA) fix malformed UNICODE_FSS data -FIX_FSS_M(ETADATA) fix malformed UNICODE_FSS metadata

mmoo-Leon-Sanders commented 3 weeks ago

Could you try with latest snapshot build ? Could you provide core dump of crash, or stack backtrace from it ?

I'll try this weekend..

hvlad commented 3 weeks ago

I re-open the issue as it is not clear what really happens. Waiting for more details.

hvlad commented 1 week ago

Any news ?