Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts

9/01/2010

How to increase Firebird backup and restore speed (up to 30%)

It seems that many Firebird developers and administrators are not aware about switch -se[rvice] for gbak.exe
The origin of this switch is in the fact that code for backup and restore can be invoked in Firebird twice - first as explicit external application (i.e., through gbak.exe) and, second, as a Services API call.

Backup/restore through Services is faster than usual approach  - due to the bypassing of interprocess communication and, probably, due to some IO optimizations.

To use Services instead of regular gbak.exe you need to add switch -se to the gbak command:

gbak -se service_mgr -b -g ...

Try to run backup with your database with and without switch -se[rvice] and compare results. In our experience switch -se can increase backup and restore speed up to 30%.
Btw, our FBdataGuard uses Services API to run backup and restore, and many users find it faster than general gbak.exe. Now you know that it's not the magic  - just good knowledge of Firebird and its internals.