|
[
Permalink
| « Hide
]
Jonas Jasas added a comment - 17/Dec/08 05:17 AM
Database with one long exception
Backup of database with one exception.
Please try this
gbak -rep tmp.gbk tmpnew.fdb -user sysdba -pass <your_pw> -skip 255 and confirm that your db is restored, but that the exception's text is truncated. If you have a real db with many metadata and data, try the same, but DO NOT OVERWRITE the original db. I want to confirm the trick works in a real life db. As I said, undocumented switch allows to resync but your exception's text is truncated (the rest is lost). We are in the way to provide a workaround and a fix, depending on the version. This hack seams to be working. I compared restored and original db, only difference was that some of exceptions truncated. Looking forward for fix.
Thank You for your effort! c:\DB>"c:\Program Files\Firebird\Firebird_2_1\bin\gbak" -rep fbbug.gbk fbbug.fdb -user sysdba -pass masterkey -skip 255 gbak:skipped 255 bytes after reading a bad attribute 114 gbak:skipped 255 bytes after reading a bad attribute 105 gbak:skipped 255 bytes after reading a bad attribute 111 gbak:skipped 255 bytes after reading a bad attribute 108 gbak:skipped 255 bytes after reading a bad attribute 108 gbak:skipped 255 bytes after reading a bad attribute 111 gbak:skipped 255 bytes after reading a bad attribute 110 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 80 gbak:skipped 255 bytes after reading a bad attribute 62 gbak:skipped 255 bytes after reading a bad attribute 114 gbak:skipped 255 bytes after reading a bad attribute 105 gbak:skipped 255 bytes after reading a bad attribute 240 gbak:skipped 255 bytes after reading a bad attribute 111 gbak:skipped 255 bytes after reading a bad attribute 78 gbak:skipped 255 bytes after reading a bad attribute 107 gbak:skipped 255 bytes after reading a bad attribute 97 gbak:skipped 255 bytes after reading a bad attribute 117 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 97 gbak:skipped 255 bytes after reading a bad attribute 97 gbak:skipped 255 bytes after reading a bad attribute 109 gbak:skipped 255 bytes after reading a bad attribute 121 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 116 gbak:skipped 255 bytes after reading a bad attribute 68 gbak:skipped 255 bytes after reading a bad attribute 117 gbak:skipped 255 bytes after reading a bad attribute 109 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 115 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 105 gbak:skipped 255 bytes after reading a bad attribute 112 gbak:skipped 255 bytes after reading a bad attribute 240 gbak:skipped 255 bytes after reading a bad attribute 116 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 98 gbak:skipped 255 bytes after reading a bad attribute 111 gbak:skipped 255 bytes after reading a bad attribute 240 gbak:skipped 255 bytes after reading a bad attribute 116 gbak:skipped 255 bytes after reading a bad attribute 109 gbak:skipped 255 bytes after reading a bad attribute 121 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 97 gbak:skipped 255 bytes after reading a bad attribute 77 gbak:skipped 255 bytes after reading a bad attribute 114 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 100 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 105 gbak:skipped 255 bytes after reading a bad attribute 116 gbak:skipped 255 bytes after reading a bad attribute 32 gbak:skipped 255 bytes after reading a bad attribute 78 gbak:skipped 255 bytes after reading a bad attribute 97 gbak:skipped 255 bytes after reading a bad attribute 109 gbak:skipped 255 bytes after reading a bad attribute 121 gbak:skipped 255 bytes after reading a bad attribute 77 gbak:skipped 255 bytes after reading a bad attribute 105 gbak:skipped 255 bytes after reading a bad attribute 111 gbak:skipped 255 bytes after reading a bad attribute 32 The resolution is far from ideal:
- For FB2.0 and FB2.1, we can't change the backup format number because it uses integral values (no minor version available). We can't increment the FB2.0 backup number because it would clash with FB2.1's backup number. We could increment the FB2.1 backup number because FB2.5 isn't released yet and we can adjust the value for v2.5, but any of those changes will make people with FB2.0/2.1 with two incompatible versions of gbak and the older one will refuse to read backups created by the previous release of the same major version (for instance, the current v2.0 gbak won't read a changed v2.0gbak's backup). - Therefore, instead of raising the backup format (needed when new tokens are introduced in a backup, among other causes), a routine to recover long exceptions was implemented in v2.0 and v2.1. It may fail in some tricky cases, but generally it has a good likelihood to succeed. Hence, the backups remain unchanged but the restore phase tries to locate the full exception message. - For FB2.5, a new token (or tag) was introduced to deal specially with long exceptions messages. Therefore, here no hack is needed, but the recovery logic was implemented anyway because gbak v2.5 will need to read backups created by v2.0 and v2.1. - I'm sorry we can't offer the best solution for past versions, but fiddling with the backup version in FB versions already released would do more harm than benefit. - Thanks to Alex to review and fix my backporting to v20 and v2.1 that I couldn't check myself due to lack of needed compiler. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||