Subject | AW: [firebird-support] Scheduled Backup |
---|---|
Author | Steffen Heil |
Post date | 2004-08-11T21:45:34Z |
Hi
So it would be better to have the date in the folder name containing all
backups.
masterkey D:\DB\db.fdb C:\BCKP\db.fbk
Or, use these 4 lines:
set folder=<backupfolder>\%date:~6,4%-%date:~3,2%-%date:~0,2%
md %folder%
ntbackup backup <sourcefolder> /j "<backupname>" /f
"%folder%\<backupname>.bkf" /v:yes /l:s /snap:on
gbak -b -user sysdba -pas <password> <db> %folder%\<databasename>.gbk
You will end up with a folder for every day which contains all backups.
You might leave "/snap:on" out, if you do not use Windows Server 2003.
explorer instead of "at".
.. see above
Regards,
Steffen
> Is there a way to schedule a backup with firebird? Also, if there isUsually, you do more than a database backup at a time.
> can I put the date in the filename so I know when the backup is of?
So it would be better to have the date in the folder name containing all
backups.
> This is for Windows:-passw
> Create a batch file (C:\bckp.cmd) with these 2 commands (just 2 lines!)
> del C:\BCKP\db.gbk
> "C:\Program Files\Firebird\Firebird_1_5\bin\gbak" -b -v -user SYSDBA
masterkey D:\DB\db.fdb C:\BCKP\db.fbk
Or, use these 4 lines:
set folder=<backupfolder>\%date:~6,4%-%date:~3,2%-%date:~0,2%
md %folder%
ntbackup backup <sourcefolder> /j "<backupname>" /f
"%folder%\<backupname>.bkf" /v:yes /l:s /snap:on
gbak -b -user sysdba -pas <password> <db> %folder%\<databasename>.gbk
You will end up with a folder for every day which contains all backups.
You might leave "/snap:on" out, if you do not use Windows Server 2003.
> at 18:00 /interactive /every:M,T,W,Th,F,S,Su C:\bckp.cmdThis is still required though you might simply use "Scheduled Tasks" in
explorer instead of "at".
> dont think you can build a DATE/TIME into the filename, unless you manageto do some fancy renaming after the backup finishes.
.. see above
Regards,
Steffen