Subject Re: [firebird-support] Backup on Linux
Author Milan Babuskov
jobrian_t wrote:
> Im a bit new in Firebird specially on Linux. I read several articles
> pertaining the use of gbak. My problem is I do not know how to
> automate it to run on a daily basis. I wish I could backup the
> database using the date as its filename, something like this
> DB = employee.gdb
> Backup = employeeAug102005.gbk
> employeeAug112005.gbk

BTW, to automate it, use cron. It is quite simple. For example, for
dailiy backup into /backup direcotry you could do something like this:

crontab -e

This will open the editor with your crontab file. Now, add a line like this:

0 2 * * * gbak -bv employee.gdb /backup/emp-`date +%F`.gbk > backup.log

Save the file and new crontab will be installed.

This will backup the database each day at 2:00 am and write the log in
backup.log file. You can even have a log for each day. Be sure to use
the full paths to gbak, database, backup and log files, as cron does not
run in the same environment as you (as a user) do.

Milan Babuskov