Interbase - agendar backup |
Top Previous Next |
You need to write yourself a little Windows Scripting Host (WSF) file/script file to launch the "backup.bat" file. Once you've created the WSF file, you can use the Windows Task Scheduler to run the job (even with the server console logged out)... (if you use Win2000, don't schedule the batch file -- it doesn't run unless the server is logged in)
To help you out (and others), here is a sample of the files I use for regular/scheduled backups -- we use a Database_DOW_HOUR naming convention.
---- Backup.wsf
<package> <job id="FirebirdBackup"> <script language="VBScript"> set WshShell = WScript.CreateObject("WScript.Shell") BackupDOW = Weekday( Date) BackupHour = Right( "00" + CStr(Hour( Time)), 2) WshShell.Run( "D:\Directory\Backup.bat " & BackupDOW & BackupHour) </script> </job> </package>
---- Backup.bat
"C:\Program Files\Firebird\Bin\GBAK" -b -user sysdba -password {Insert Password} -nt -v D:\Directory\Database.gdb D:\Directory\Database_%1.Gbk |