Situatie
Solutie
Step-by-Step Firebird 2.5 to Firebird 3.0 Migration:
1. Prepare for Conversion
- Check Metadata and Queries: Ensure compatibility with Firebird 3.0 (triggers, stored procedures, etc.).
- Recompile Objects in Firebird 3.0: After the migration, recompile any objects containing BLR (triggers, stored procedures).
2. Install Dependencies (Linux)
- CentOS/RHEL:
- Enable EPEL repository:
yum install epel-release
-
- Install libtommath:
yum install libtommath
- Ubuntu:
- Install libtommath0 (Ubuntu 16) or libtommath1 (Ubuntu 18+):
sudo apt-get install libtommath0 # for Ubuntu 16sudo apt-get install libtommath1 # for Ubuntu 18+
-
- Create a symlink if needed (Ubuntu 18):
sudo ln -s /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0
3. Install Firebird 3.0
- Install Firebird 3.0.4 into a separate location:
./install.sh -path /opt/fb3
4. Stop Firebird 2.5 (Classic Server):
- If using Classic, disable xinetd for Firebird:
sudo systemctl stop xinetd
5. Perform Stream Conversion
- Set Environment Variables for Embedded Access:
export ISC_USER=username ISC_PASSWORD=password
- Run Stream Conversion:
/opt/firebird/bin/gbak -b /path_to_db/db25.fdb stdout | /opt/fb3/bin/gbak -c stdin /path_to_db/db30.fdb
6. Post-Conversion Steps
- Remove Temporary Firebird 3 Instance:
sudo rm -rf /opt/fb3
- Uninstall Firebird 2.5:
sudo yum remove firebird # or use apt-get for Ubuntu
- Install Firebird 3.0 from tar.gz:
tar -xzvf Firebird-3.0.x.tar.gz -C /opt/
7. Set Database Ownership
- Ensure the firebird user is the owner of the database:
sudo chown firebird.firebird /path_to_db/db30.fdb
Summary:
- Install Firebird 3.0 and its dependencies.
- Stop Firebird 2.5, especially xinetd (if Classic is used).
- Perform the stream conversion using gbak from Firebird 2.5 to Firebird 3.0.
- Recompile any objects and test your database.
- Remove the temporary Firebird 3 installation, uninstall Firebird 2.5, and perform a clean installation of Firebird 3.
Leave A Comment?