Subject | RE: [firebird-support] GBAK error on the running database |
---|---|
Author | Nigel Weeks |
Post date | 2006-11-15T02:48:12Z |
Why don't you just gbak a running database, restore it to a temporary
database location, and be done with it.
That'll save all this dangerous killing of processes, and copying of
database files, etc.
N.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]On Behalf Of Dipesh
Sent: Wednesday, 15 November 2006 1:26 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] GBAK error on the running database
Hi,
I am trying to run gbak and restore on the database which is running
by following the steps mentioned below. (This is in my script)
1) Stop the database. (killing firebird server)
2) Start the database.
3) gfix shut (forcefully shutting the database)
4) Copying the database as repair_myDB.fdb
5) gfix validate (Validate the copied database)
6) gfix mend (Mend the validated database i step5)
7) gfix validate (Validate the mended database again)
8) gbak validated database from step 7 into my backup location.
This step creates a backup file but the process gbak in windows is
running forever and not returning. When i manually run the same
command i.e. gbak it works perfectly fine and creates a file which is
larger than the file created by the hanging process.
9) gbak restore from the backup file created in step 8
10) gfix validate (validate the restored database file)
11) stop the database server.
12) Rename the main database file i..e myDB.fdb to myDB_timestamp.fdb
13) Rename my restored file to the same file as it was in step1 i.e.
myDB.fdb
13) Restart the database.
If I manually do steps 8 and 9 it works fine but when I am running
this script programatically it is halting somewhere. When I killed the
process and tried to restore the database from the backup file
generated from this halted process it gave me following error.
Done with volume #1,
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Press return to reopen that file, or type a new
name followed by return to open a different file.
Name:
=> I have pressed enter above.
Expected volume number 2, found volume 1
gbak:
Could not read from file
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Done with volume #1,
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Press return to reopen that file, or type a new
name followed by return to open a different file.
Name:
=> I have pressed enter above.
Expected volume number 2, found volume 1
gbak:
Could not read from file
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Done with volume #1,
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Press return to reopen that file, or type a new
name followed by return to open a different file.
Name: 1
=> I have pressed 1 above.
gbak: ERROR: expected backup description record
gbak: Exiting before completion due to errors
I have run my above script programatically on the database which were
not running. I am doing something wrong above.
Any input to figure out this problem will be highly appreciated.
Thank you.
Regards,
Dipesh
[Non-text portions of this message have been removed]
database location, and be done with it.
That'll save all this dangerous killing of processes, and copying of
database files, etc.
N.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]On Behalf Of Dipesh
Sent: Wednesday, 15 November 2006 1:26 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] GBAK error on the running database
Hi,
I am trying to run gbak and restore on the database which is running
by following the steps mentioned below. (This is in my script)
1) Stop the database. (killing firebird server)
2) Start the database.
3) gfix shut (forcefully shutting the database)
4) Copying the database as repair_myDB.fdb
5) gfix validate (Validate the copied database)
6) gfix mend (Mend the validated database i step5)
7) gfix validate (Validate the mended database again)
8) gbak validated database from step 7 into my backup location.
This step creates a backup file but the process gbak in windows is
running forever and not returning. When i manually run the same
command i.e. gbak it works perfectly fine and creates a file which is
larger than the file created by the hanging process.
9) gbak restore from the backup file created in step 8
10) gfix validate (validate the restored database file)
11) stop the database server.
12) Rename the main database file i..e myDB.fdb to myDB_timestamp.fdb
13) Rename my restored file to the same file as it was in step1 i.e.
myDB.fdb
13) Restart the database.
If I manually do steps 8 and 9 it works fine but when I am running
this script programatically it is halting somewhere. When I killed the
process and tried to restore the database from the backup file
generated from this halted process it gave me following error.
Done with volume #1,
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Press return to reopen that file, or type a new
name followed by return to open a different file.
Name:
=> I have pressed enter above.
Expected volume number 2, found volume 1
gbak:
Could not read from file
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Done with volume #1,
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Press return to reopen that file, or type a new
name followed by return to open a different file.
Name:
=> I have pressed enter above.
Expected volume number 2, found volume 1
gbak:
Could not read from file
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Done with volume #1,
"Path_to_backup_file\Backup_20061114_161716_myDB.fdb.fbk"
Press return to reopen that file, or type a new
name followed by return to open a different file.
Name: 1
=> I have pressed 1 above.
gbak: ERROR: expected backup description record
gbak: Exiting before completion due to errors
I have run my above script programatically on the database which were
not running. I am doing something wrong above.
Any input to figure out this problem will be highly appreciated.
Thank you.
Regards,
Dipesh
[Non-text portions of this message have been removed]