Subject RE: [firebird-support] Re: Firebird automatic nightly backup
Author Werner Cloete
Cool bananas..!! :o)

Thanx for the speedy response... :o)

-----Original Message-----
From: m2data [mailto:brianhansen@...]
Sent: 18 June 2004 12:55
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Firebird automatic nightly backup


Hi

Yes you could use a batch file and schedule it with AT (2000,XP). I
would recommend nnCron which is a Unix Clone (and FREE). You can get
it at: http://www.nncron.ru/

Use at batch file like the following (not testet lately)

@echo off

"c:\program files\firebird\bin\gbak.exe" -B -user sysdba -password xx
c:\base\base.fdb c:\backup\backup.bck

if %errorlevel% neq 0 goto errorbackup

"c:\program files\firebird\bin\gbak.exe" -R -user sysdba -password xx
c:\test\backup.bck c:\test\verify.tmp

if %errorlevel% neq 0 goto errorverify

goto success

:errorbackup
echo ERROR >error.log
goto end

:errorverify
echo VERIFYERROR >error.log
goto end

:success
:end

Brian Vraamark

--- In firebird-support@yahoogroups.com, "Werner Cloete" <werner@f...>
wrote:
>
> Hi everyone... :o)
>
> How would you run nightly backups on a Windows machine..?
>
> One option I considered is creating a batch file and setting
Windows
> up, through a schedule, to run the batch file every night...
>
> Will that work...or is there a better alternative..?
>
> -----Original Message-----
> From: Jaume Sabater [mailto:jsabater@l...]
> Sent: 18 June 2004 11:36
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Firebird automatic nightly backup
>
>
> Raigo wrote:
>
> > How to create Firebird 1 automatic nightly backups ?
> >
> > 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).
>
> I see you are sending your emails from Mozilla on a Windows
machine.
> 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"
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
> This e-mail message is confidential and intended solely for the
person to whom or the entity to which it is addressed. All the
contents and any attachments remain the property of VR Services (Pty)
Ltd unless so stated by contract.
> If you are not the intended recipient, you are prohibited from
reading, copying, using or disclosing this message to others.
> If you received this message in error, please notify the sender
immediately by replying to this e-mail or by telephoning +27 21 430
9300 and thereafter delete the message. VR Services (Pty) Ltd does not
accept liability for any personal views expressed in this message.





Yahoo! Groups Links





This e-mail message is confidential and intended solely for the person to whom or the entity to which it is addressed. All the contents and any attachments remain the property of VR Services (Pty) Ltd unless so stated by contract.
If you are not the intended recipient, you are prohibited from reading, copying, using or disclosing this message to others.
If you received this message in error, please notify the sender immediately by replying to this e-mail or by telephoning +27 21 430 9300 and thereafter delete the message. VR Services (Pty) Ltd does not accept liability for any personal views expressed in this message.