Subject Re: [firebird-support] Gbak cmd file - is this safe?
Author Daniel Albuschat
2006/6/26, Robin Davis <ro.davis@...>:
> Hi,
>
> I'm using the following cmd file to backup my live databases twice a day
> via a Windows Scheduled Event. Is it okay with the experts or am I
> leaving myself open for disaster?
>
> ===========================================
> C:\Firebird\bin\gbak.exe -t -g -co -user SYSDBA -password ******** -y
> c:\utils\backup2.txt 192.168.2.2:"C:\Documents And Settings\All
> Users\Documents\VOCALPOINT.FDB" D:\VOCALPOINT.FBK
> C:\Firebird\bin\gbak.exe -t -g -co -user SYSDBA -password ******** -y
> c:\utils\backup3.txt 192.168.2.100:"C:\Documents And Settings\All
> Users\Documents\VOCALPOINT.FDB" D:\VOCALPOINT_REMOTE.FBK
> if errorlevel 1 goto problem
> if errorlevel 0 goto exit
> :exit
> C:\usr\sbin\sendmail -messagefile=c:\utils\backup2.txt
> -subject="Completed Firebird Backup Notification" *******@**************
> del c:\utils\backup2.txt
> del c:\utils\backup3.txt
> j:
> xcopy "d:\*.fbk" /y
> exit
> :problem
> C:\usr\sbin\sendmail -messagefile=c:\utils\backup2.txt -subject="Failed
> Firebird Backup Notification" *******@**************
> del c:\utils\backup2.txt
> del c:\utils\backup3.txt
> exit

This looks OK to me. I would've used sh instead of cmd, since you seem to have
cygwin installed anyways. ;-)
I wonder why you are using the -g switch. Isn't this *disabling* the garbage
collector?

Regards,
Daniel Albuschat
--
eat(this); // delicious suicide