Subject | Re: Firebird automatic nightly backup |
---|---|
Author | m2data |
Post date | 2004-06-18T10:55:07Z |
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:
contents and any attachments remain the property of VR Services (Pty)
Ltd unless so stated by contract.
9300 and thereafter delete the message. VR Services (Pty) Ltd does not
accept liability for any personal views expressed in this message.
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:
>Windows
> Hi everyone... :o)
>
> How would you run nightly backups on a Windows machine..?
>
> One option I considered is creating a batch file and setting
> up, through a schedule, to run the batch file every night...some way
>
> 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
>machine.
> > 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
> Just in case your servers run Linux, try with a job in the croncalling
> a script similar to this:to
>
> #!/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
> your needs.file.
>
> Only, and I mean _only_, firebird user should have access to this
> Or root if you prefer (depending on where to set the cron job).Anyway,
> be careful about security, as it contains the SYSDBA password.person to whom or the entity to which it is addressed. All the
>
> --
> Jaume Sabater
> http://linuxsilo.net
>
> "Ubi sapientas ibi libertas"
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
> This e-mail message is confidential and intended solely for 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 fromreading, copying, using or disclosing this message to others.
> If you received this message in error, please notify the senderimmediately 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.