Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database which has active attachments can not be replaced from backup file even after database shut down [CORE1475] #1891

Closed
firebird-automations opened this issue Sep 24, 2007 · 13 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Yakov Hrebtov (jake)

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

@firebird-automations
Copy link
Collaborator Author

Modified by: Yakov Hrebtov (jake)

summary: Database which has active attachments can not be replaced from backup file even ater database shut down => Database which has active attachments can not be replaced from backup file even after database shut down

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Target: 2.5.0 [ 10221 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Yakov Hrebtov (jake)

Version: 2.1 Beta 2 [ 10190 ]

Version: 2.0.3 [ 10200 ]

Version: 2.0.1 [ 10090 ]

description: 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. Shutdown database:
/opt/firebird/bin/gfix -shut multi -force 0 dbname
3. 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

=>

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

environment: snapshot build: LI-T2.1.0.16657 CS => snapshot build: LI-T2.1.0.16657 CS, LI-T2.1.0.17520 CS, FB 2.0.1 CS, FB 2.0.3 CS

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 13150 ] => Firebird [ 13955 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Open [ 1 ]

Fix Version: 2.5 Alpha 1 [ 10224 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Open [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

Fix Version: 2.5 Alpha 1 [ 10224 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Initial [ 10301 ]

Fix Version: 2.5 Beta 1 [ 10251 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 3.0 Initial [ 10301 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Beta 1 [ 10332 ]

Fix Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.3 [ 10461 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment