Subject Re: [firebird-support] moving db onto another machine
Author Jaume Sabater
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 23 February 2004 22:28, Ronan van Riet wrote:

> Thanks for your reply! I am new to Firebird. What exactly is gbak? Who
> should I call it?
> Is there a whitepaper that outlines it use?

Ronan, here you are two scripts I use very often in my GNU/Debian Linux box.

I strongly suggest you to have a look at the Operations Guide manual:
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_download_documentation

In case you are working on a Windows platform, get the idea from below and
cook it for yourself.

dbbackup:
#!/bin/bash
SRC_DB=my_database.fdb
BAK_DB=my_database.fdb.bak
gbak -B -T -PAS masterkey -USER SYSDBA ${SRC_DB} ${BAK_DB}
if [ -e ${BAK_DB}.bz2 ]
then
rm ${BAK_DB}.bz2
fi
bzip2 ${BAK_DB}

dbrestore:
#!/bin/bash
SRC_DB=my_database.fdb
BAK_DB=my_database.bak
rm -f ${SRC_DB}
if [ -e ${BAK_DB}.bz2 ]
then
bunzip2 ${BAK_DB}.bz2
fi
gbak -C -O -V -K -P 16384 -USER SYSDBA -PAS masterkey ${BAK_DB} ${SRC_DB}

- --
Jaume Andreu Sabater Malondra
jsabater@...
http://www.linuxsilo.net

"Ubi sapientas ibi libertas"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAOnYCVATr4IuSCZIRAjLyAKCknSDvvGztuqi4VMtGnlF+uq29cgCg2kC5
V6nVO4zHczyZagKgVVrlTDQ=
=ZXa+
-----END PGP SIGNATURE-----