Skip to content

NeoZX/fb_formats

Repository files navigation

EN RU

About project

This project contains a description of the file formats used in the Firebird and RedDatabase projects. Formats are described in Kaitai Struct language. Not all formats are fully described; a more complete and accurate description can be seen in the source codes of the projects. You can use these descriptions to develop your own utilities for working with structures used in Firebird projects.

File Database

  • ods11.ksy - on-disk-structure version 11. Used in Firebird 2.x, RedDatabase 2.x.
  • ods12.ksy - on-disk-structure version 12. Used in Firebird 3.x, RedDatabase 3.x.
  • ods13.ksy - on-disk-structure version 13. Used in Firebird 4.x.

Replication logs

  • replication_log_v1.ksy - replication log. Used in RedDatabase 2.6 (protocol 1), RedDatabase 3.0 и HQBird 3.0 (protocol 2).
  • change_log_v1.ksy - change log. Improved version of the replication log. Used in Firebird 4.0.

Status file

  • rdb_replication_status_file.ksy - the status of the replication logs application file. Used in RedDatabase 2.6, RedDatabase 3.0 and HQBird 3.0.
  • fb4_replication_status_file.ksy - the status of the replication logs application file. Used in Firebird 4.0.

nbackup

  • nbak_header.ksy - Incremental/differential backup headers created by nbackup utility.

gbak

  • gbak_header.ksy - backup headers created by gbak utility.

Requirements

The ksc utility is used to generate classes. The kaitaistruct package must be installed for Python.

Usage example

Using the kaitai-struct-visualizer utility, you can view binaries by ksy description files. View DB file employee.fdb RDBMS Firebird 4:

ksv employee.fdb kaitai/ods11.ksy

Examples of use in Python:

  • view_replication_log.py - view replication log.
  • view_rdb_rpl_status.py - view status replication log.
  • view_change_log.py - view change log.
  • view_fb4_rpl_status.py - view status change log.

Restrictions

Data structures are loaded into RAM. If you need to view large files, you need an appropriate amount of RAM.

About

Firebird file formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published