Issue Details (XML | Word | Printable)

Key: CORE-1475
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Yakov Hrebtov
Votes: 0
Watchers: 2

If you were logged in you would be able to see more operations.
Firebird Core

Database which has active attachments can not be replaced from backup file even after database shut down

Created: 24/Sep/07 03:42 AM   Updated: 19/Jan/16 05:02 AM
Component/s: None
Affects Version/s: 2.0.1, 2.1 Beta 1, 2.0.3, 2.1 Beta 2
Fix Version/s: 2.5.3, 3.0 Beta 1

Environment: snapshot build: LI-T2.1.0.16657 CS, LI-T2.1.0.17520 CS, FB 2.0.1 CS, FB 2.0.3 CS

Target: 2.5.0
QA Status: No test

 Description  « Hide
An error occurs on attempt to replace shut down database which has an active attachments.
Database remains partially (almost empty) restored.

Steps to reproduce:
1. Open database connection as unpriviledged database user;
2. Try to replace database from backup file:
    /opt/firebird/bin/gbak -V -REP backupfile dbname

You'll get:

gbak:opened file /tmp/test.fbk
gbak: ERROR:could not drop database localhost:test (database might be in use)
gbak:Exiting before completion due to errors

This is expected, but this step is required to reproduce subsequent error on step 4.

3. Shutdown database:
    /opt/firebird/bin/gfix -shut multi -force 0 dbname
4. Try to replace database from backup file:
    /opt/firebird/bin/gbak -V -REP backupfile dbname

And you will get:

gbak:opened file /opt/firebird/data/manual-backup/generation_devel.fbk
gbak:transportable backup -- data in XDR format
gbak: backup file is compressed
gbak: ERROR:database shutdown unsuccessful
gbak: ERROR: no permission for shutdown or online access to database generation_devel
gbak: ERROR:failed to create database generation_devel
gbak:Exiting before completion due to errors

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.