Unable to backup firebird database file locked

We are using Windows 11 and a Firebird 2.5 database engine.

We have three locations that all use the same version of Firebird. We have an automatic backup routine that runs daily to create a zipped copy of the database. Up until a few months ago the backup routine was working correctly.

Now, the backup routine fails due to a “file in use” error. If I try to use the Windows built in method to zip the file (right-click and select “send to zip file”) we get the error : “The action could not be completed as the file is open in Firebird default instance”.

If I do the exact same thing using Windows 10, there is no such error, has anyone else experienced this problem? And if so, can anyone offer any solution or work-around? We could copy the file – but this is not desirable as the databases can be over 700MB.

1

When a database is in use by the Firebird server process, the file is locked, and you cannot create a copy of it if you’re using SuperServer mode (the most common mode), and if you’re using Classic or SuperClassic mode, then copying the file is a good way to end up with an unusable/inconsistent backup of your database. This inconsistency happens as ongoing transactions will modify the database, while your copy/zip process will read some of those changes, but possibly not all of those changes.

You should use the gbak tool or nbackup tool to backup the database instead of trying to create a file copy. And if you do want to create a file copy, you need to put the database in “backup mode” first to ensure that the file contents is consistent.

There are two ways to put the database in backup mode:

  • Execute ALTER DATABASE BEGIN BACKUP when connected to the database, perform the copy, and then execute ALTER DATABASE END BACKUP
  • Lock the database with nbackup -L <database> (same as BEGIN BACKUP above), perform the copy, and then unlock the database with nbackup -N <database> (same as END BACKUP above); see also nbackup – Locking the database and making the backup yourself.

When the database is in “backup mode”, the database file itself will be stable (it is not modified by ongoing transactions), and instead the modifications are temporarily stored in a “delta” file. After you end the “backup mode” those changes are reintegrated into the normal database file.

A copy of the database created in backup mode, needs to be “fixed up” to be usable, otherwise it will complain about a missing delta file. You can do this with nbackup -F <database>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Unable to backup firebird database file locked

We are using Windows 11 and a Firebird 2.5 database engine.

We have three locations that all use the same version of Firebird. We have an automatic backup routine that runs daily to create a zipped copy of the database. Up until a few months ago the backup routine was working correctly.

Now, the backup routine fails due to a “file in use” error. If I try to use the Windows built in method to zip the file (right-click and select “send to zip file”) we get the error : “The action could not be completed as the file is open in Firebird default instance”.

If I do the exact same thing using Windows 10, there is no such error, has anyone else experienced this problem? And if so, can anyone offer any solution or work-around? We could copy the file – but this is not desirable as the databases can be over 700MB.

1

When a database is in use by the Firebird server process, the file is locked, and you cannot create a copy of it if you’re using SuperServer mode (the most common mode), and if you’re using Classic or SuperClassic mode, then copying the file is a good way to end up with an unusable/inconsistent backup of your database. This inconsistency happens as ongoing transactions will modify the database, while your copy/zip process will read some of those changes, but possibly not all of those changes.

You should use the gbak tool or nbackup tool to backup the database instead of trying to create a file copy. And if you do want to create a file copy, you need to put the database in “backup mode” first to ensure that the file contents is consistent.

There are two ways to put the database in backup mode:

  • Execute ALTER DATABASE BEGIN BACKUP when connected to the database, perform the copy, and then execute ALTER DATABASE END BACKUP
  • Lock the database with nbackup -L <database> (same as BEGIN BACKUP above), perform the copy, and then unlock the database with nbackup -N <database> (same as END BACKUP above); see also nbackup – Locking the database and making the backup yourself.

When the database is in “backup mode”, the database file itself will be stable (it is not modified by ongoing transactions), and instead the modifications are temporarily stored in a “delta” file. After you end the “backup mode” those changes are reintegrated into the normal database file.

A copy of the database created in backup mode, needs to be “fixed up” to be usable, otherwise it will complain about a missing delta file. You can do this with nbackup -F <database>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật