Subject RE: [firebird-support] gbak
Author Svein Erling Tysvær
Why do you rename the database files, Sergio? Do you have any problems that gets 'solved' (hidden) this way? Hopefully, renaming the files will fail if someone is connected to the database. If someone was in the middle of a transaction when you did the backup, even if they disconnected before the restore, their changes would not be in the restored backup.

Set

-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Sergio H. Gonzalez
Sent: 3. juli 2008 15:57
To: firebird-support@yahoogroups.com
Subject: [firebird-support] gbak

Hello, is it safe to run this bat with the Firebird (2.1) service running ?
What if there is a user attached to the database?
If this is not the correct way to do it, which is the correct one?
Thanks!!
Sergio

------- RESTORE.BAT --------

del log.txt

gbak data.fdb datos.fbk -user sysdba -password
masterkey -ignore -Limbo -v -y log.txt

gbak -create -v data.fbk data_rec.fdb -user sysdba -password
masterkey -n -r -p 4096

ren data.fdb data_old.fdb

ren data_rec.fdb data.fdb