Subject | Re: [firebird-support] Firebird automatic nightly backup |
---|---|
Author | Jaume Sabater |
Post date | 2004-06-18T09:36:11Z |
Raigo wrote:
Just in case your servers run Linux, try with a job in the cron calling
a script similar to this:
#!/bin/bash
GBAK=/usr/bin/gbak
# Database
SRC_DB=/var/lib/firebird/data/database.fdb
BAK_DB=/var/lib/firebird/backup/database.fdb.gbak
${GBAK} -B -T -PAS masterkey -USER SYSDBA ${SRC_DB} ${BAK_DB}
if [ -e ${BAK_DB} ]
then
bzip2 -f ${BAK_DB}
fi
This script is for GNU/Debian Linux Firebird packages. Customize it to
your needs.
Only, and I mean _only_, firebird user should have access to this file.
Or root if you prefer (depending on where to set the cron job). Anyway,
be careful about security, as it contains the SYSDBA password.
--
Jaume Sabater
http://linuxsilo.net
"Ubi sapientas ibi libertas"
> How to create Firebird 1 automatic nightly backups ?I see you are sending your emails from Mozilla on a Windows machine.
>
> The system should do a backup every night and there should be some way
> to know when certain backup was made (for example .gbk file name should
> have date in it somehow like 18_06_2004.gbk).
Just in case your servers run Linux, try with a job in the cron calling
a script similar to this:
#!/bin/bash
GBAK=/usr/bin/gbak
# Database
SRC_DB=/var/lib/firebird/data/database.fdb
BAK_DB=/var/lib/firebird/backup/database.fdb.gbak
${GBAK} -B -T -PAS masterkey -USER SYSDBA ${SRC_DB} ${BAK_DB}
if [ -e ${BAK_DB} ]
then
bzip2 -f ${BAK_DB}
fi
This script is for GNU/Debian Linux Firebird packages. Customize it to
your needs.
Only, and I mean _only_, firebird user should have access to this file.
Or root if you prefer (depending on where to set the cron job). Anyway,
be careful about security, as it contains the SYSDBA password.
--
Jaume Sabater
http://linuxsilo.net
"Ubi sapientas ibi libertas"